@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --card-front: #3b82f6;
    --card-back: #10b981;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Main Container */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Loader */
.loader {
    display: none;
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Flashcard Styles */
.flashcard-container {
    perspective: 1000px;
    width: 100%;
    max-width: 600px;
    height: 350px;
    margin-bottom: 2rem;
}

.flashcard {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5), 0 10px 10px -5px rgba(0,0,0,0.3);
    border-radius: 20px;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: 20px;
    font-size: 2rem;
    font-weight: 600;
}

.card-front {
    background: linear-gradient(135deg, var(--card-front), #2563eb);
    color: white;
}

.card-back {
    background: linear-gradient(135deg, var(--card-back), #059669);
    color: white;
    transform: rotateY(180deg);
}

.hint-text {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

button:disabled {
    background-color: #475569;
    cursor: not-allowed;
    transform: none;
}

/* Admin Styles */
.admin-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
    text-align: center;
}

.admin-card h2 {
    margin-bottom: 2rem;
}

.file-input-wrapper {
    margin-bottom: 2rem;
    text-align: left;
}

.file-input-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed #475569;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
    cursor: pointer;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

#status-message {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.success { color: #10b981; }
.error { color: #ef4444; }

/* Progress Counter */
.progress {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #94a3b8;
}
