* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 6s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.container {
    max-width: 650px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
    margin: auto;
}

.container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.icon {
    font-size: 64px;
    margin-bottom: 15px;
    display: block;
    animation: bounce 3s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-size: 32px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

.upload-form {
    margin-bottom: 30px;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 14px;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 20px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
}

input[type="file"]:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, #f0f1ff 0%, #e8e9ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.password-input {
    display: block;
    width: 100%;
    padding: 18px;
    margin-bottom: 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.15s ease;
    background: white;
}

.password-field {
    margin-bottom: 15px;
}

.password-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.password-input:focus {
    outline: none;
    border-color: #667eea;
    background: #f8f9ff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

button.loading .loader {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.5);
}

button:active {
    transform: translateY(-1px);
}

.result {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 30px;
    border-radius: 16px;
    border-left: 6px solid #4caf50;
    animation: slideIn 0.25s ease;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
    margin-bottom: 20px;
}

.result:last-child {
    margin-bottom: 0;
}

.file-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #2e7d32;
    font-size: 14px;
    text-align: center;
    word-break: break-all;
}

.result-item {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    transition: transform 0.1s ease;
}

.result-item:hover {
    transform: translateX(3px);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-weight: 700;
    color: #2e7d32;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.result-value {
    color: #1b5e20;
    font-size: 20px;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
}

.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    padding: 25px;
    border-radius: 16px;
    border-left: 6px solid #f44336;
    color: #c62828;
    font-weight: 600;
    animation: slideIn 0.25s ease;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.2);
    margin-bottom: 20px;
}

.error-inline {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    color: #c62828;
    font-weight: 600;
    text-align: center;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        overflow: hidden;
    }
    
    .container {
        padding: 30px 20px;
        max-height: none;
        border-radius: 20px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .header {
        margin-bottom: 25px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .icon {
        font-size: 50px;
    }
    
    .subtitle {
        font-size: 13px;
    }
    
    input[type="file"] {
        padding: 16px;
        font-size: 13px;
    }
    
    .password-input {
        padding: 15px;
        font-size: 14px;
    }
    
    button {
        padding: 16px;
        font-size: 16px;
    }
    
    .result {
        padding: 20px;
    }
    
    .result-value {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        overflow: hidden;
    }
    
    .container {
        padding: 25px 16px;
        border-radius: 16px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .icon {
        font-size: 42px;
    }
    
    input[type="file"] {
        padding: 14px;
        font-size: 12px;
    }
    
    .password-input {
        padding: 13px;
        font-size: 13px;
    }
    
    button {
        padding: 14px;
        font-size: 15px;
    }
    
    .result-value {
        font-size: 15px;
    }
}
