/* Base styles for all classroom templates */

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

/* Cross-platform font stack with rounded, kid-friendly fonts */
body {
    /* iOS 13+ rounded system font */
    font-family: ui-rounded,
                 /* iOS < 13 */
                 'SF Pro Rounded',
                 /* Android rounded */
                 'Google Sans',
                 /* Windows rounded */
                 'Segoe UI',
                 /* Fallback rounded fonts */
                 'Nunito', 'Quicksand', 'Varela Round',
                 /* Standard fallbacks */
                 -apple-system, BlinkMacSystemFont, 'Roboto',
                 'Helvetica Neue', Arial, sans-serif;

    /* Enable font smoothing for better rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

    /* Make text appear friendlier with slight letter spacing */
    letter-spacing: 0.3px;
}

/* Common gradient background */
.gradient-background {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Common button styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Common back button */
.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 25px;
    font-size: 1.1em;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    z-index: 1000;
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Common container */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 1000px;
    width: 100%;
}

/* Common heading styles */
h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
}

/* Common message styles */
.message {
    text-align: center;
    margin-top: 20px;
    font-size: 1.5em;
    min-height: 40px;
}

.message.success {
    color: #28a745;
    animation: bounce 0.5s;
}

.message.error {
    color: #dc3545;
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .back-btn {
        padding: 10px 18px;
        font-size: 1em;
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    .back-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}