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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.lock-icon {
    width: 60px;
    height: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    color: var(--text-light);
    font-size: 15px;
}

.error-message,
.success-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: shake 0.4s ease;
}

.error-message {
    background: #fee;
    color: var(--danger);
    border: 1px solid #fcc;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.error-message svg,
.success-message svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-group label svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-light);
}

.dashboard-header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.logo-section h1 {
    font-size: 24px;
    color: var(--text-dark);
    font-weight: 700;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
}

.username svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--danger);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-logout svg {
    width: 18px;
    height: 18px;
}

.dashboard-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

.upload-section,
.files-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.upload-section h2,
.files-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 25px;
    font-weight: 700;
}

.upload-section h2 svg,
.files-section h2 svg {
    width: 26px;
    height: 26px;
    color: var(--primary);
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-light);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.upload-text {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-subtext {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.btn-choose {
    padding: 12px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-choose:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.upload-progress {
    margin-top: 25px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.empty-state {
    text-align: center;
    padding: 80px 30px;
    color: var(--text-light);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--border);
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px;
    color: var(--text-light);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.file-card {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.file-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon.apk {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.file-icon.zip {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.file-icon svg {
    width: 28px;
    height: 28px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.file-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

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

.btn-download,
.btn-delete {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-download {
    background: var(--secondary);
    color: white;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.btn-delete:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.btn-download svg,
.btn-delete svg {
    width: 18px;
    height: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 15px 20px;
    }

    .logo-section h1 {
        font-size: 20px;
    }

    .dashboard-main {
        padding: 20px 15px;
    }

    .upload-section,
    .files-section {
        padding: 20px;
    }

    .files-grid {
        grid-template-columns: 1fr;
    }

    .user-section {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 35px 25px;
    }

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