/**
 * 桃園市仁和國民小學晶幣系統樣式表
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', sans-serif;
    background: linear-gradient(135deg, #FF6B6B 0%, #FFE66D 25%, #4ECDC4 50%, #95E1D3 75%, #C7CEEA 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #FFE66D 0%, #FF6B6B 50%, #4ECDC4 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    padding: 25px 0;
    text-align: center;
    position: relative;
}

.header-content h1 {
    font-size: 2.5em;
    color: white;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}

/* User Info */
.user-info {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    color: white;
    font-weight: 600;
    font-size: 0.95em;
    background: rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.btn-logout {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.btn-logout:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

.btn-logout-page {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-logout-page:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Navigation */
nav {
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 15px 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 24px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 1px;
    overflow: hidden;
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: linear-gradient(135deg, #FFE66D30 0%, #4ECDC430 100%);
    border-left-color: #FF6B6B;
    padding-left: 25px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main Content */
main {
    padding: 40px 0;
}

.content-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Form */
.login-container {
    max-width: 500px;
    margin: 0 auto;
}

.login-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 1.05em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF6B6B;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

.message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    animation: fadeInDown 0.4s ease;
}

.message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
}

/* Home Page */
.welcome-section {
    text-align: center;
    padding: 60px 0;
}

.welcome-section h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 50%, #FFE66D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.welcome-section p {
    font-size: 1.2em;
    color: #666;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255, 230, 109, 0.3) 0%, rgba(78, 205, 196, 0.3) 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: #FF6B6B;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    background: linear-gradient(135deg, rgba(255, 230, 109, 0.5) 0%, rgba(78, 205, 196, 0.5) 100%);
}

.feature-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #4ECDC4 0%, #FF6B6B 50%, #FFE66D 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 8px 0;
    font-size: 1em;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

footer p:first-child {
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: 1px;
}

footer p:last-child {
    font-style: italic;
    font-size: 1.1em;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 1024px) {
    .user-info {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.8em;
    }

    .user-info {
        flex-direction: column;
        gap: 10px;
    }

    .welcome-text {
        font-size: 0.85em;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .nav-item {
        width: 90%;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: 5px;
    }

    .content-card {
        padding: 25px;
    }

    .welcome-section {
        padding: 30px 0;
    }

    .welcome-section h2 {
        font-size: 1.8em;
    }

    .welcome-section p {
        font-size: 1em;
    }
}