/* Base Styles */
:root {
    --primary-color: #4361ee;
    --primary-light: #4895ef;
    --accent-color: #3f37c9;
    --danger-color: #f72585;
    --success-color: #4cc9f0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --teacher-color: #7209b7;
    --student-color: #4361ee;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7ff;
    color: var(--dark-color);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Initial View */
.initial-view {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 3rem;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
    z-index: 2;
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
}

.teacher-view .logo-circle {
    background: linear-gradient(135deg, var(--teacher-color) 0%, #b5179e 100%);
}

.brand-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.brand-header p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.primary-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.teacher-view .primary-btn {
    background: linear-gradient(135deg, var(--teacher-color) 0%, #b5179e 100%);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.teacher-view .primary-btn:hover {
    box-shadow: 0 5px 15px rgba(114, 9, 183, 0.3);
}

.generate-tip {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--gray-color);
    text-align: center;
}

.welcome-graphic {
    position: relative;
    width: 50%;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    z-index: 1;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.circle-element, .square-element, .triangle-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s infinite ease-in-out;
}

.circle-element {
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
}

.square-element {
    width: 150px;
    height: 150px;
    background: var(--accent-color);
    border-radius: 20px;
    top: 60%;
    left: 20%;
    animation-delay: 1s;
}

.triangle-element {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid var(--success-color);
    top: 30%;
    right: 15%;
    animation-delay: 2s;
    opacity: 0.08;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.panel-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.header-content h1 {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark-color);
}

.header-content h1 i {
    color: var(--primary-color);
}

.teacher-view .header-content h1 i {
    color: var(--teacher-color);
}

.header-content p {
    font-size: 0.9rem;
    color: var(--gray-color);
}

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

.icon-btn {
    padding: 8px 15px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e0e0e0;
    color: var(--dark-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.icon-btn.danger {
    color: var(--danger-color);
    border-color: rgba(247, 37, 133, 0.3);
}

.icon-btn.danger:hover {
    background: rgba(247, 37, 133, 0.05);
}

.panel-content {
    flex: 1;
    padding: 2rem;
    background: #f8f9fa;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
}

.status-header h2 span {
    color: var(--primary-color);
    font-weight: 600;
}

.teacher-view .status-header h2 span {
    color: var(--teacher-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 500;
}

.status-indicator .pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(76, 201, 240, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 201, 240, 0); }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.teacher-view .feature-card i {
    color: var(--teacher-color);
}

.feature-card.primary i {
    color: white;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.mini-btn {
    padding: 6px 12px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: var(--dark-color);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
}

.mini-btn:hover {
    background: #e9ecef;
}

.feature-card.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.teacher-view .feature-card.primary {
    background: linear-gradient(135deg, var(--teacher-color) 0%, #b5179e 100%);
}

.feature-card.primary h3,
.feature-card.primary p {
    color: white;
}

.feature-card.accent {
    background: linear-gradient(135deg, #3a0ca3 0%, #4361ee 100%);
    color: white;
}

.feature-card.accent h3,
.feature-card.accent p {
    color: white;
}

.feature-card.large {
    grid-column: span 2;
}

.stats-preview {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat .number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    color: white;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat .label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.progress-preview {
    width: 100%;
    margin-top: 1rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: white;
}

/* Kicked Message */
.kicked-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.kicked-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.kicked-card i {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1.5rem;
}

.kicked-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.kicked-card p {
    margin-bottom: 2rem;
    color: var(--gray-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .initial-view {
        flex-direction: column;
        padding: 1rem;
    }
    
    .auth-card {
        max-width: 100%;
    }
    
    .welcome-graphic {
        width: 100%;
        max-width: 400px;
        margin-top: 2rem;
    }
    
    .feature-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .panel-content {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-preview {
        flex-direction: column;
        gap: 1rem;
    }
    
    .kicked-card {
        padding: 2rem 1.5rem;
    }
}

.subjects-banner {
    font-family: 'Poppins', sans-serif;
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.subject-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.subject-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.subject-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subject-icon i {
    font-size: 2.5rem;
    z-index: 2;
}

.subject-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Physics Card */
.physics {
    border-top: 4px solid #4361ee;
}

.physics .subject-icon i {
    color: #4361ee;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(67, 97, 238, 0.1);
}

.p1 { width: 30px; height: 30px; top: 10px; left: 10px; animation: orbit 8s linear infinite; }
.p2 { width: 20px; height: 20px; bottom: 15px; right: 15px; animation: orbit 6s linear infinite reverse; }
.p3 { width: 15px; height: 15px; top: 30px; right: 20px; animation: orbit 5s linear infinite; }

/* Chemistry Card */
.chemistry {
    border-top: 4px solid #3a0ca3;
}

.chemistry .subject-icon i {
    color: #3a0ca3;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(58, 12, 163, 0.1);
    animation: floatUp 4s infinite ease-in-out;
}

.b1 { width: 25px; height: 25px; top: 5px; left: 15px; animation-delay: 0s; }
.b2 { width: 15px; height: 15px; bottom: 10px; right: 10px; animation-delay: 0.5s; }
.b3 { width: 20px; height: 20px; top: 25px; right: 5px; animation-delay: 1s; }

/* Mathematics Card */
.math {
    border-top: 4px solid #f72585;
}

.math .subject-icon i {
    color: #f72585;
}

.shape {
    position: absolute;
    background: rgba(247, 37, 133, 0.1);
}

.s1 { width: 25px; height: 25px; top: 10px; left: 10px; border-radius: 50%; animation: pulse 3s infinite; }
.s2 { width: 20px; height: 20px; bottom: 15px; right: 15px; border-radius: 5px; animation: pulse 4s infinite reverse; }
.s3 { width: 30px; height: 15px; top: 30px; right: 10px; border-radius: 10px; animation: pulse 5s infinite; }

/* Biology Card */
.biology {
    border-top: 4px solid #4cc9f0;
}

.biology .subject-icon i {
    color: #4cc9f0;
}

.cell {
    position: absolute;
    border-radius: 50%;
    background: rgba(76, 201, 240, 0.1);
    animation: pulse 3s infinite ease-in-out;
}

.c1 { width: 30px; height: 30px; top: 5px; left: 5px; animation-delay: 0s; }
.c2 { width: 20px; height: 20px; bottom: 10px; right: 10px; animation-delay: 0.3s; }
.c3 { width: 25px; height: 25px; top: 30px; right: 5px; animation-delay: 0.6s; }

.inspiration-quote {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.inspiration-quote p {
    font-size: 1.4rem;
    font-weight: 500;
    color: #333;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quote-author {
    font-size: 1rem;
    color: #666;
}

/* Animations */
@keyframes orbit {
    0% { transform: rotate(0deg) translateX(15px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(15px) rotate(-360deg); }
}

@keyframes floatUp {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-15px); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

@media (max-width: 480px) {
    .subject-cards-container {
        grid-template-columns: 1fr;
    }
}