/* ========== VARIABLES & RESETS ========== */

:root {
    --primary-color: #02e49b;
    --secondary-color: #1ea0c3;
    --dark-color: #1e1f26;
    --bg-light: #f0f0f0;
    --bg-darker: #e8e8e8;
    --text-dark: #1e1f26;
    --text-light: #444;
    --border-color: #02e49b;
    --shadow: 0 4px 12px rgba(2, 228, 155, 0.15);
    --transition: all 0.3s ease;
}

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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: #444;
    line-height: 1.6;
    background-color: #f0f0f0;
}

/* ========== NAVBAR ========== */

.navbar {    
    background: #02e49b;
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 2px solid #02e49b;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.navbar-logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.navbar h2 {
    flex: 1;
    margin: 0;
    font-size: 1.4rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ========== GENERAL CONTAINER ========== */

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* ========== HOME PAGE ========== */

.home-page {
    background: #f0f0f0;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 3rem;
}

.hero h1 {
    font-size: 2.8rem;
    color: #1e1f26;
    margin-bottom: 0.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    font-weight: 400;
}

.home-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    background: #fafafa;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border-top: 3px solid #02e49b;
}

.feature:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #1ea0c3;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.feature p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== CTA SECTION ========== */

.cta-section {
    background: #fafafa;
    padding: 3.5rem 2rem;
    border-radius: 8px;
    margin-top: 3rem;
    border-left: 4px solid #02e49b;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section h2 {
    color: #1e1f26;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.cta-section p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.join-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.join-input {
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 280px;
    transition: var(--transition);
    font-family: inherit;
    background: #fff;
    color: #1e1f26;
}

.join-input:focus {
    outline: none;
    border-color: #02e49b;
    box-shadow: 0 0 0 3px rgba(2, 228, 155, 0.1);
}

/* ========== BUTTONS ========== */

.btn {
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: #02e49b;
    color: #1e1f26;
    box-shadow: 0 2px 6px rgba(2, 228, 155, 0.2);
}

.btn-primary:hover {
    background: #01c285;
    box-shadow: 0 4px 10px rgba(2, 228, 155, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-danger {
    background: #e94c89;
    color: white;
}

.btn-danger:hover {
    background: #d63970;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

/* ========== LOGIN PAGE ========== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f0f0;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.login-card {
    background: #fafafa;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px;
    text-align: center;
    border-top: 4px solid #02e49b;
}

.login-logo {
    height: 60px;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.login-card h1 {
    color: #1e1f26;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.login-form {
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: #1e1f26;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
    background: #fff;
    color: #1e1f26;
}

.form-group input:focus {
    outline: none;
    border-color: #02e49b;
    box-shadow: 0 0 0 3px rgba(2, 228, 155, 0.1);
}

.error-message {
    background: #fdeaea;
    color: #c41e3a;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
    border-left: 4px solid #c41e3a;
    font-size: 0.9rem;
}

.divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2rem 0;
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.login-footer a {
    color: #02e49b;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ========== ADMIN PAGE ========== */

.admin-page {
    background: #f0f0f0;
}

.admin-section {
    background: #fafafa;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border-top: 4px solid #02e49b;
}

.admin-section h2 {
    color: #1e1f26;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.form-message {
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    animation: slideIn 0.3s ease;
    font-size: 0.9rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.form-message.error {
    background: #fdeaea;
    color: #c41e3a;
    border-left: 4px solid #c41e3a;
}

.form-message.loading {
    background: #e3f2fd;
    color: #1565c0;
}

/* ========== ROOMS TABLE ========== */

.rooms-table-wrapper {
    overflow-x: auto;
}

.rooms-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.rooms-table thead {
    background: #02e49b;
    color: #1e1f26;
}

.rooms-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.rooms-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    font-size: 0.9rem;
    background: #fff;
}

.rooms-table tbody tr {
    transition: var(--transition);
}

.rooms-table tbody tr:hover {
    background-color: #f9f9f9;
}

.rooms-table code {
    background: #f0f0f0;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #1ea0c3;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
    font-size: 0.95rem;
}

/* ========== ERROR PAGE ========== */

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f0f0;
}

.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.error-card {
    background: #fafafa;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    text-align: center;
    border-top: 4px solid #e94c89;
}

.error-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
}

.error-card h1 {
    color: #1e1f26;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.error-message {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ========== JOIN PAGE ========== */

.join-page body {
    margin: 0;
    padding: 0;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .join-input-group {
        flex-direction: column;
    }

    .join-input {
        width: 100%;
    }

    .navbar-content {
        flex-wrap: wrap;
        padding: 0 1rem;
        gap: 1rem;
    }

    .navbar h2 {
        font-size: 1rem;
    }

    .rooms-table {
        font-size: 0.85rem;
    }

    .rooms-table th,
    .rooms-table td {
        padding: 0.7rem 0.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }

    .admin-section {
        padding: 1.5rem;
    }

    .login-card {
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem;
    }

    .navbar-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .navbar h2 {
        font-size: 0.9rem;
    }

    .home-content {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem;
        max-width: 100%;
    }

    .cta-section {
        padding: 1.5rem 1rem;
    }

    .join-input {
        width: 100%;
    }
}

/* ========== ANIMATIONS ========== */

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

.frog-loader {
    animation: frogJump 1s infinite;
}
