@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body {
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), 
                url('https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&q=80&w=2070');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.container { max-width: 1000px; width: 100%; z-index: 1; text-align: center; }

header { margin-bottom: 40px; }
.logo { font-size: 3rem; animation: float 3s ease-in-out infinite; display: inline-block; filter: drop-shadow(0 0 10px var(--primary)); }
header h1 { font-size: 2.5rem; font-weight: 800; }
header h1 span { color: var(--primary); }

.input-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 24px;
    margin-bottom: 30px;
}

textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    color: white;
    margin-top: 10px;
}

button#generateBtn {
    width: 100%;
    padding: 18px;
    margin-top: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card-container { height: 280px; perspective: 1000px; }
.card { width: 100%; height: 100%; position: relative; transition: transform 0.6s; transform-style: preserve-3d; }
.card.flipped { transform: rotateY(180deg); }

.front, .back {
    position: absolute;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--glass-border);
}

.front { background: rgba(30, 41, 59, 0.9); }
.back { background: #1e40af; transform: rotateY(180deg); }

.mastery-section { background: var(--glass); padding: 20px; border-radius: 15px; margin-bottom: 30px; }
.progress-container { width: 100%; height: 10px; background: rgba(0,0,0,0.3); border-radius: 10px; overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: var(--primary); transition: 0.5s; }

.master-btn { background: var(--primary); color: #0f172a; padding: 10px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; }
.hinglish-btn, .doubt-btn { background: rgba(255,255,255,0.1); color: white; border: 1px solid var(--glass-border); padding: 8px; border-radius: 6px; cursor: pointer; font-size: 0.7rem; font-weight: 600; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }