* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header et Navigation */
header {
    background-color: #0a0a0a;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.login-btn-header {
    background-color: transparent;
    color: #ff6b6b;
    border: none;
    padding: 0.5rem 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: none;
}

.login-btn-header:hover {
    background-color: transparent;
    color: #ff5252;
    transform: none;
    box-shadow: none;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.hero {
    text-align: center;
    max-width: 700px;
    animation: fadeIn 0.8s ease-in;
}

.hero-content {
    background-color: rgba(45, 45, 45, 0.8);
    padding: 3rem;
    border-radius: 10px;
    border-left: 5px solid #888;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.welcome-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.description {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.login-btn {
    background-color: #4a7c59;
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    background-color: #5a9c6f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 124, 89, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

/* Footer */
footer {
    background-color: #0a0a0a;
    text-align: center;
    padding: 1.5rem;
    color: #888;
    border-top: 1px solid #333;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AUTH PAGE STYLES */
.auth-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-container {
    background-color: rgba(45, 45, 45, 0.8);
    padding: 2rem;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #555;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #4a7c59;
}

.tab-btn:hover:not(.active) {
    color: #aaa;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-form h2 {
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #b0b0b0;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a7c59;
    background-color: #222;
    box-shadow: 0 0 8px rgba(74, 124, 89, 0.2);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background-color: #1a1a1a;
    color: #fff;
}

.error-message {
    display: none;
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: center;
}

.submit-btn {
    width: 100%;
    padding: 0.85rem;
    background-color: #4a7c59;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background-color: #5a9c6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.back-link {
    color: #888;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #fff;
}

/* DASHBOARD STYLES */
.dashboard {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}

.dashboard-container {
    max-width: 1000px;
    width: 100%;
    background-color: rgba(45, 45, 45, 0.8);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.dashboard-container.fullscreen {
    max-width: none;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
}

.dashboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #555;
}

.dashboard-tab-btn {
    flex: 1;
    padding: 1.2rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-tab-btn.active {
    color: #fff;
    border-bottom-color: #4a7c59;
}

.dashboard-tab-btn:hover:not(.active) {
    color: #aaa;
    background-color: rgba(74, 124, 89, 0.05);
}

.dashboard-tab-content {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
    flex: 1;
    overflow-y: auto;
}

.dashboard-tab-content.active {
    display: flex;
    flex-direction: column;
}

.welcome-box {
    text-align: center;
}

.welcome-box h1 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.welcome-box span {
    color: #4a7c59;
}

.success-message {
    color: #4a7c59;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.dashboard-description {
    color: #b0b0b0;
    font-size: 1rem;
    line-height: 1.6;
}

.user-info {
    width: 100%;
}

.user-info h2 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-bottom: 1px solid #444;
    color: #b0b0b0;
    transition: all 0.3s ease;
}

.info-item:hover {
    background-color: rgba(74, 124, 89, 0.05);
    padding-left: 1.5rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    font-weight: 600;
    color: #888;
    font-size: 0.95rem;
}

.info-item .value {
    color: #fff;
    font-weight: 500;
}

.logout-btn {
    width: calc(100% - 4rem);
    margin: 1rem 2rem;
    padding: 0.9rem;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

/* CHAT STYLES */
.chat-init-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 2rem;
    text-align: center;
}

.chat-init-container h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.chat-buttons-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.chat-action-btn {
    padding: 1rem 2rem;
    border: 2px solid #4a7c59;
    background-color: transparent;
    color: #4a7c59;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 200px;
}

.chat-action-btn:hover {
    background-color: #4a7c59;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.chat-action-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.chat-room-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #444;
    background-color: rgba(0, 0, 0, 0.2);
}

.chat-room-info h3 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

.user-count {
    color: #888;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

.leave-chat-btn {
    padding: 0.5rem 1rem;
    background-color: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.leave-chat-btn:hover {
    background-color: #ff5252;
}

.chat-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

.chat-sidebar {
    width: 200px;
    background-color: rgba(0, 0, 0, 0.3);
    border-right: 1px solid #444;
    overflow-y: auto;
    padding: 1rem;
}

.connected-users h4 {
    color: #fff;
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-item {
    padding: 0.6rem 0.8rem;
    background-color: rgba(74, 124, 89, 0.2);
    border-left: 3px solid #4a7c59;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-item.current {
    background-color: rgba(74, 124, 89, 0.4);
    color: #4a7c59;
    font-weight: 600;
}

.user-item::before {
    content: '●';
    color: #4a7c59;
    font-size: 1rem;
}

.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    overflow: hidden;
}

.chat-box {
    flex: 1;
    background-color: rgba(20, 20, 20, 0.5);
    border-radius: 8px;
    border: 1px solid #444;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #2c2f33;
    border-radius: 5px;
    border: 1px solid #444;
}

.message {
    padding: 8px 10px;
    margin-bottom: 5px;
    background-color: #3c3f45;
    border-radius: 5px;
    color: #ffffff;
    word-wrap: break-word;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: slideIn 0.3s ease;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.chat-message-author {
    font-weight: 600;
    color: #4a7c59;
}

.chat-message-time {
    color: #666;
    font-size: 0.75rem;
}

.chat-message-content {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    word-wrap: break-word;
}

.chat-message.user .chat-message-content {
    background-color: #4a7c59;
    color: #fff;
    margin-left: auto;
    max-width: 70%;
    text-align: right;
}

.chat-message.other .chat-message-content {
    background-color: #555;
    color: #e0e0e0;
    max-width: 70%;
}

.chat-message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 6px;
    margin-top: 0.25rem;
}

.chat-input-area {
    border-top: 1px solid #444;
    padding-top: 1rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #4a7c59;
    background-color: #222;
    box-shadow: 0 0 8px rgba(74, 124, 89, 0.2);
}

.emoji-btn, .media-btn, .send-btn {
    padding: 0.75rem 0.9rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.emoji-btn, .media-btn {
    background-color: #555;
    color: #fff;
}

.emoji-btn:hover, .media-btn:hover {
    background-color: #666;
}

.send-btn {
    background-color: #4a7c59;
    color: #fff;
    min-width: 100px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.send-btn:hover {
    background-color: #5a9c6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 124, 89, 0.3);
}

.emoji-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    background-color: #2d2d2d;
    padding: 0.75rem;
    border-radius: 5px;
    margin-top: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.emoji-picker button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
}

.emoji-picker button:hover {
    transform: scale(1.2);
}

/* MODAL STYLES */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #2d2d2d;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #444;
}

.modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #444;
    justify-content: flex-end;
}

.btn-cancel, .btn-primary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-cancel {
    background-color: #555;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #666;
}

.btn-primary {
    background-color: #4a7c59;
    color: #fff;
}

.btn-primary:hover {
    background-color: #5a9c6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 124, 89, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PUBLICITÉ PAYPAL */
.paypal-ad {
    background: linear-gradient(135deg, #0070ba 0%, #009cde 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.paypal-ad::before {
    content: '💰';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    opacity: 0.3;
}

.paypal-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.4);
}

.paypal-ad a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.paypal-ad a:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

.paypal-ad-top {
    background: linear-gradient(135deg, #0070ba 0%, #009cde 100%);
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 112, 186, 0.3);
}

.paypal-ad-top a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
}

.paypal-ad-top a:hover {
    text-decoration: underline;
}

.paypal-ad-sidebar {
    background: linear-gradient(135deg, #0070ba 0%, #009cde 100%);
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
}

.paypal-ad-sidebar a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

.paypal-ad-sidebar a:hover {
    text-decoration: underline;
}

.paypal-ad-footer {
    background: linear-gradient(135deg, #0070ba 0%, #009cde 100%);
    color: #fff;
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
}

.paypal-ad-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.paypal-ad-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-container {
        margin: 0 1rem;
    }

    .dashboard-tab-btn {
        font-size: 0.9rem;
        padding: 1rem;
    }

    .dashboard-tab-content {
        padding: 1.5rem;
    }

    .welcome-title {
        font-size: 1.8rem;
    }

    .welcome-box h1 {
        font-size: 1.5rem;
    }

    .description {
        font-size: 1rem;
    }

    .hero-content {
        padding: 2rem;
    }

    .login-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .auth-container {
        padding: 1.5rem;
    }

    .user-info h2 {
        font-size: 1.2rem;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .logout-btn {
        width: calc(100% - 3rem);
        margin: 1rem 1.5rem;
    }

    /* Chat Section */
    #chat-container {
        height: 300px;
    }

    .chat-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-count {
        margin-top: 0.5rem;
    }

    .chat-action-btn {
        width: 100%;
        padding: 0.8rem;
    }

    .chat-messages {
        padding: 0.5rem;
    }

    .message {
        font-size: 0.9rem;
    }

    #messageInput {
        padding: 8px;
    }

    #messageForm button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
