/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    /* Dark gradient background */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    padding: 20px;
    color: #f0f0f0; /* Light text by default */
}

/* Container */
.container,
.form-container,
.welcome-card {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    /* Dark card with subtle light overlay */
    background: rgba(30, 30, 46, 0.85);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
    color: #f0f0f0;
}

.form-container {
    max-width: 400px;
}

/* Welcome Card */
.welcome-card {
    text-align: center;
    padding: 50px 40px;
}

/* Logo Section */
.logo-section {
    margin-bottom: 40px;
}

.logo-section i {
    font-size: 4rem;
    color: #6a8cff; /* Softer blue for dark mode */
    margin-bottom: 20px;
    display: block;
    animation: pulse 2s infinite;
}

.logo-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.logo-section h1 span {
    color: #6a8cff;
}

.logo-section p {
    color: #b0b0c0;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.5;
}

/* Headings */
h1, h2 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 25px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Input Fields */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #444;
    border-radius: 50px;
    background: rgba(20, 20, 30, 0.7);
    color: #f0f0f0;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

input:focus {
    border-color: #6a8cff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 140, 255, 0.25);
}

/* Buttons */
button,
.btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #6a8cff, #8a5cff);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 140, 255, 0.3);
    text-align: center;
}

button:hover,
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(106, 140, 255, 0.5);
}

.btn {
    display: inline-block;
    width: auto;
    min-width: 150px;
    padding: 15px 30px;
    margin: 5px;
}

.btn-outline {
    background: transparent;
    color: #6a8cff;
    border: 2px solid #6a8cff;
}

.btn-outline:hover {
    background: #6a8cff;
    color: white;
}

/* Logout Button */
.logout {
    background: linear-gradient(45deg, #ff4d4d, #ff2a2a);
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3);
}

.logout:hover {
    background: linear-gradient(45deg, #ff2a2a, #cc0000);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 77, 77, 0.5);
}

/* Buttons Container */
.buttons,
.auth-buttons {
    text-align: center;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.auth-buttons {
    margin-bottom: 40px;
}

/* Remove underline from auth buttons */
.auth-buttons a {
    text-decoration: none;
}

.auth-buttons a:hover,
.auth-buttons a:focus,
.auth-buttons a:active {
    text-decoration: none;
}

/* Messages */
.error,
.success {
    text-align: center;
    padding: 15px;
    border-radius: 50px;
    margin-bottom: 20px;
    border: 1px solid;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.error {
    color: #ff6b6b;
    background-color: rgba(50, 20, 25, 0.7);
    border-color: rgba(200, 80, 80, 0.4);
}

.success {
    color: #6bff8d;
    background-color: rgba(20, 40, 25, 0.7);
    border-color: rgba(80, 180, 100, 0.4);
}

/* Room List */
.room-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.room-item {
    background: rgba(25, 25, 40, 0.7);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: #f0f0f0;
}

.room-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.room-item h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.3rem;
}

/* Features Section */
.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #c0c0d6;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    background: rgba(30, 30, 50, 0.6);
    padding: 15px;
    border-radius: 15px;
    min-width: 120px;
}

.feature:hover {
    transform: scale(1.05);
}

.feature i {
    font-size: 1.8rem;
    color: #6a8cff;
    background: rgba(106, 140, 255, 0.1);
    padding: 12px;
    border-radius: 50%;
}

/* Decorative Elements */
.decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 10%;
    animation-delay: 2s;
}

.circle-3 {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 20%;
    animation-delay: 4s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .container,
    .form-container,
    .welcome-card {
        width: 95%;
        padding: 20px;
        margin: 15px auto;
    }

    .welcome-card {
        padding: 40px 25px;
    }

    .logo-section h1 {
        font-size: 2.2rem;
    }

    .logo-section i {
        font-size: 3rem;
    }

    .logo-section p {
        font-size: 1rem;
        line-height: 1.4;
    }

    .auth-buttons,
    .buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        min-height: 50px;
        font-size: 1.1rem;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        max-width: 350px;
    }

    .room-list {
        grid-template-columns: 1fr;
    }

    .circle-1 {
        width: 60px;
        height: 60px;
        top: 10%;
        left: 5%;
    }

    .circle-2 {
        width: 90px;
        height: 90px;
        bottom: 10%;
        right: 5%;
    }

    .circle-3 {
        width: 40px;
        height: 40px;
        top: 40%;
        left: 15%;
    }
}

@media (max-width: 480px) {
    .welcome-card {
        padding: 30px 20px;
    }

    .logo-section h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 15px;
        font-size: 1rem;
    }

    .feature {
        padding: 12px;
    }

    .feature i {
        min-width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }

    .feature span {
        font-size: 0.9rem;
    }
}

/* Mobile touch target enhancement */
body.mobile-device .btn {
    min-height: 44px;
}