/* STEAM PBL Project Generator - Advanced CSS */
:root {
    --primary: #6e48aa;
    --secondary: #ff6b6b;
    --accent: #4ecdc4;
    --light: #f8f9fa;
    --dark: #2d3436;
    --glass: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    transition: all 0.4s ease;
    position: relative;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a2a6c 0%, #b21f1f 50%, #fdbb2d 100%);
}

/* Background Particles */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    pointer-events: none;
    animation: float 20s infinite linear;
}

/* Glass Cards */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Header */
.header {
    text-align: center;
    padding: 2.5rem 1rem;
    border-radius: 25px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 3.2rem;
    background: linear-gradient(45deg, #fff, #ffd89b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.ai-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    animation: pulse 2s infinite;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #fff;
}

select, input {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

select option, input::placeholder {
    color: #ccc;
}

.dark-mode select, .dark-mode input {
    background: rgba(0,0,0,0.3);
}

/* Buttons */
.btn {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.loading {
    display: none;
    font-size: 1.2rem;
}

.generate-btn.loading .loading {
    display: inline-block;
    animation: spin 1s linear infinite;
}

/* Project Output */
.project-output {
    min-height: 400px;
    position: relative;
}

.placeholder {
    text-align: center;
    padding: 3rem 1rem;
}

.floating-robot {
    font-size: 5rem;
    animation: float 6s ease-in-out infinite;
    display: inline-block;
}

/* Resources */
.resources-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.resource-card {
    background: rgba(255,255,255,0.15);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.resource-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.resource-card:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.05);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: 0.3s;
    z-index: 1000;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .grid { grid-template-columns: 1fr; }
    .header h1 { font-size: 2.5rem; }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}