:root {
    --primary-color: #673ab7; /* Deep purple */
    --primary-light: #9575cd;
    --primary-dark: #4527a0;
    --secondary-color: #ffc107; /* Amber/gold */
    --secondary-light: #fff350;
    --secondary-dark: #ff8f00;
    --accent-color: #00bcd4; /* Cyan */
    --background-color: #f5f0ff;
    --text-color: #333;
    --light-grey: #e0e0e0;
    --white: #fff;
    --shadow: 0 4px 12px rgba(103, 58, 183, 0.15);
    --card-shadow: 0 8px 24px rgba(103, 58, 183, 0.2);
    --magical-gradient: linear-gradient(135deg, #673ab7, #9c27b0);
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(156, 39, 176, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(103, 58, 183, 0.05) 0%, transparent 50%);
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Magic Lamp Animation */
.lamp-container {
    position: absolute;
    top: 20px;
    right: 5%;
    z-index: 1;
    width: 80px;
    height: 120px;
    transform: rotate(-15deg);
}

.magic-lamp {
    position: relative;
    width: 80px;
    height: 60px;
}

.lamp-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 15px;
    background-color: var(--secondary-color);
    border-radius: 10px 10px 0 0;
}

.lamp-body {
    position: absolute;
    top: 15px;
    left: 5px;
    width: 70px;
    height: 30px;
    background: linear-gradient(to right, var(--secondary-light), var(--secondary-color), var(--secondary-dark));
    border-radius: 35px / 15px;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.5);
}

.lamp-base {
    position: absolute;
    bottom: 0;
    left: 25px;
    width: 30px;
    height: 15px;
    background-color: var(--secondary-dark);
    border-radius: 0 0 5px 5px;
}

.smoke-container {
    position: absolute;
    top: 0;
    left: 40px;
    width: 40px;
    height: 40px;
    transform: translateY(-40px);
}

.smoke {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(var(--primary-light), 0.2);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    animation: smokeAnimation 3s infinite;
}

.smoke:nth-child(1) {
    animation-delay: 0s;
    left: 0;
}

.smoke:nth-child(2) {
    animation-delay: 0.5s;
    left: 10px;
}

.smoke:nth-child(3) {
    animation-delay: 1s;
    left: 20px;
}

@keyframes smokeAnimation {
    0% {
        transform: scale(0) translateY(0);
        opacity: 0;
    }
    20% {
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5) translateY(-20px);
        opacity: 0.3;
    }
    80% {
        opacity: 0.2;
    }
    100% {
        transform: scale(3) translateY(-40px);
        opacity: 0;
    }
}

/* Header Styles */
header {
    background: var(--magical-gradient);
    color: var(--white);
    padding: 30px 0;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 3rem;
    font-family: 'Kaushan Script', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.highlight {
    color: var(--secondary-color);
    font-weight: bold;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 5px;
    font-weight: 300;
}

/* Main Content Styles */
main {
    padding: 40px 0;
    position: relative;
    z-index: 2;
}

.intro {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 1.1rem;
}

.magical-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.magical-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}

.magical-input {
    position: relative;
}

.magical-input input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--light-grey);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.magical-input input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.2);
    outline: none;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--light-grey);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    background-color: var(--white);
    font-family: 'Poppins', sans-serif;
}

.select-wrapper select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.2);
    outline: none;
}

.select-wrapper .fa-chevron-down {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
}

/* Selection Notice */
.selection-notice {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
}

.fa-lamp-icon {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-right: 10px;
}

.selection-notice p {
    margin: 0;
    font-size: 1rem;
}

/* Button Styles */
.genie-btn {
    background: var(--magical-gradient);
    color: var(--white);
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(103, 58, 183, 0.3);
    position: relative;
    overflow: hidden;
}

.genie-btn::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
    transition: transform 0.6s ease;
}

.genie-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.4);
}

.genie-btn:hover::after {
    transform: rotate(30deg) translate(10%, 10%);
}

.genie-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(103, 58, 183, 0.3);
}

.btn-text {
    margin-right: 8px;
}

/* Result Section */
.result-section {
    text-align: center;
}

.result-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
    position: relative;
}

.result-section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-light), var(--accent-color));
    border-radius: 3px;
}

.result-container {
    position: relative;
    background-color: #f8f5ff;
    border: 1px solid var(--light-grey);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    text-align: left;
}

#generated-prompt {
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #2c234d;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
    padding: 8px 16px;
    background-color: var(--secondary-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--magical-gradient);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    margin-bottom: 10px;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Disabled Select */
select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lamp-container {
        top: 10px;
        right: 10px;
        transform: scale(0.8) rotate(-15deg);
    }
    
    header h1 {
        font-size: 2.3rem;
    }
    
    .magical-card {
        padding: 20px;
    }
    
    .selection-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .fa-lamp-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .genie-btn {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .lamp-container {
        display: none;
    }
    
    header {
        padding: 20px 0;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .magical-card::before {
        height: 4px;
    }
    
    .magical-input input,
    .select-wrapper select {
        padding: 10px 35px 10px 12px;
    }
    
    .result-container {
        padding: 15px;
    }
    
    .copy-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
}

/* For larger screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .lamp-container {
        right: 10%;
        transform: scale(1.2) rotate(-15deg);
    }
    
    header h1 {
        font-size: 3.5rem;
    }
    
    .intro {
        width: 80%;
        margin: 0 auto 40px;
    }
    
    .magical-card {
        width: 80%;
        margin: 0 auto 50px;
    }
    
    .genie-btn {
        margin-top: 20px;
    }
}

/* Add a specific style for the location icon */
.fa-map-marker-alt {
    color: #e91e63; /* Pink color to differentiate from other icons */
}

/* Add a highlight effect for location-based relevance */
.magical-input input:focus ~ .fa-map-marker-alt {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

/* Adjust spacing for the expanded form */
.form-section {
    padding-bottom: 40px;
}

/* Add visual cue for grade level detection */
.grade-level-detected {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 8px;
    background-color: rgba(103, 58, 183, 0.1);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-dark);
}
