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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    width: 100%;
}

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

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.account-hint {
    font-size: 0.9em !important;
    opacity: 0.8 !important;
    margin-top: 5px;
}

.upload-area {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px dashed #ddd;
}

.upload-area:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.upload-area.drag-over {
    border-color: #667eea;
    background: #f8f9ff;
}

.upload-content svg {
    color: #667eea;
    margin-bottom: 20px;
}

.upload-content h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.upload-content p {
    color: #666;
    margin-bottom: 8px;
}

.upload-content p strong {
    color: #667eea;
    font-weight: 700;
}

.upgrade-hint {
    font-size: 0.85em !important;
    color: #999 !important;
    margin-top: 5px !important;
}

.progress-area,
.result-area,
.download-area,
.error-area {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.file-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    margin: 0 auto 20px;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    margin: 0 auto 20px;
}

.result-area h2,
.download-area h2,
.error-area h2 {
    color: #333;
    margin-bottom: 20px;
}

.link-box {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.link-box input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    background: #f8f9fa;
}

.result-area .btn-primary,
.result-area .btn-secondary,
.download-area .btn-primary,
.download-area .btn-secondary,
.auth-container .btn-primary,
.auth-container .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-area .btn-primary,
.download-area .btn-primary,
.auth-container .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.result-area .btn-primary:hover,
.download-area .btn-primary:hover,
.auth-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.result-area .btn-secondary,
.download-area .btn-secondary,
.auth-container .btn-secondary {
    background: #f0f0f0;
    color: #333;
    margin-top: 15px;
    display: inline-block;
    text-decoration: none;
}

.result-area .btn-secondary:hover,
.download-area .btn-secondary:hover,
.auth-container .btn-secondary:hover {
    background: #e0e0e0;
}

.expire-text {
    color: #666;
    font-size: 0.9em;
}

.hidden {
    display: none !important;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .link-box {
        flex-direction: column;
    }
}

/* Auth Styles */
.auth-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-link {
    text-align: center;
    margin-top: 15px;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.premium-features {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 15px;
}

.premium-features h3 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.premium-features ul {
    list-style: none;
    padding: 0;
}

.premium-features li {
    padding: 10px 0;
    color: #333;
    font-size: 1.05em;
}

/* User Menu */
.user-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.user-info {
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu button,
.user-menu a {
    padding: 14px 28px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    font-size: 1em;
    line-height: 1;
    vertical-align: middle;
    box-sizing: border-box;
    margin: 0;
}

.user-menu button:hover,
.user-menu a:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.user-menu .btn-primary {
    background: white;
    color: #667eea;
    border-color: white;
    padding: 14px 28px;
}

.user-menu .btn-primary:hover {
    background: #667eea;
    color: white;
    border-color: white;
}

.user-menu .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
    padding: 14px 28px;
}

.premium-badge {
    background: gold;
    color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 700;
}

@media (max-width: 768px) {
    .user-menu {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin-bottom: 20px;
    }
}

/* Email Section Container */
.email-section-container {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;
    margin-top: 20px;
}

.email-section {
    text-align: left;
}

.email-section label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 15px;
    font-size: 0.95em;
}

.email-section label:first-child {
    margin-top: 0;
}

.email-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
    transition: border-color 0.3s ease;
    background: white;
}

.email-section input:focus {
    outline: none;
    border-color: #667eea;
}

.email-section small {
    display: block;
    color: #999;
    font-size: 0.85em;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* Cancel Button */
.btn-cancel {
    margin-top: 15px;
    padding: 12px 24px;
    border: 2px solid #f44336;
    background: transparent;
    color: #f44336;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #f44336;
    color: white;
    transform: translateY(-2px);
}

/*
 Dashboard Styles */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    padding: 10px;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.user-name {
    color: white;
    font-weight: 600;
    margin-right: 10px;
}

/* Files List */
.files-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #f8f9ff;
}

.file-item-info h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.file-item-info p {
    color: #666;
    font-size: 0.9em;
}

.file-item-actions {
    display: flex;
    gap: 10px;
}

.file-item-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    background: white;
    border-radius: 15px;
}

.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 15px;
}

.empty-state p {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .file-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .file-item-actions {
        width: 100%;
    }

    .file-item-actions button {
        flex: 1;
    }
}


/* Admin Styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2em;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card p {
    color: #666;
    font-size: 0.9em;
}

.admin-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-item:hover {
    background: #f8f9ff;
}

.admin-item-info h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.admin-item-info p {
    color: #666;
    font-size: 0.95em;
    margin: 3px 0;
}

.admin-item-meta {
    color: #999 !important;
    font-size: 0.85em !important;
}

.admin-item-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.admin-item-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.badge-admin {
    background: #ff5722;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.7em;
    font-weight: 700;
    margin-left: 8px;
}

.badge-premium {
    background: gold;
    color: #333;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.7em;
    font-weight: 700;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-item {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .admin-item-actions {
        width: 100%;
    }

    .admin-item-actions button {
        flex: 1;
    }
}
