/* Main theme colors and variables */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --accent-color: #4a90e2;
    --text-color: #ffffff;
    --hover-color: #3a3a3a;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --click-animation: cubic-bezier(0.4, 0, 0.2, 1);
    --admin-color: #e74c3c;
}

/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Navigation styles */
.navbar {
    background-color: var(--bg-secondary);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.nav-links {
    display: flex;
    gap: 1rem;
    margin: 0 1rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    transition: all 0.3s var(--click-animation);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s var(--click-animation);
    z-index: -1;
}

.nav-links a:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.nav-links a.active {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.nav-links a:active {
    transform: translateY(0);
    box-shadow: none;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s var(--click-animation);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.logo:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.logo:active {
    transform: translateY(0);
}

/* Profile section styles */
.profile-section {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s var(--click-animation);
    cursor: pointer;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-section:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-section:active {
    transform: translateY(0);
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    transition: all 0.3s var(--click-animation);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-section:hover .profile-pic {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.profile-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Google sign-in button styles */
.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    color: #757575;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s var(--click-animation);
    border: none;
    cursor: pointer;
}

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

.google-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.google-btn img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s var(--click-animation);
}

.google-btn:hover img {
    transform: scale(1.1);
}

/* Logout button styles */
#logout-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    display: inline-block;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s var(--click-animation);
}

#logout-btn:hover {
    color: var(--accent-color);
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

#logout-btn:active {
    transform: translateY(0);
}

/* Main content styles */
.main-content {
    margin-top: 100px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
    padding-bottom: 80px; /* Add padding to prevent content from being hidden behind footer */
}

/* Settings styles */
.settings-section {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.settings-group {
    margin-bottom: 2rem;
}

.settings-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settings-option label {
    min-width: 150px;
    color: var(--text-primary);
}

.color-picker {
    -webkit-appearance: none;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: 2px solid var(--accent-color);
    border-radius: 4px;
}

.size-picker {
    width: 200px;
    height: 8px;
    -webkit-appearance: none;
    background: var(--bg-primary);
    border-radius: 4px;
    outline: none;
}

.size-picker::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s var(--click-animation);
}

.size-picker::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.settings-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.settings-checkbox:hover {
    filter: brightness(1.2);
}

.save-btn, .test-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s var(--click-animation);
    margin-right: 1rem;
}

.save-btn:hover, .test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.save-btn:active, .test-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.test-btn {
    background-color: var(--bg-secondary);
    border: 2px solid var(--accent-color);
}

.test-btn:hover {
    background-color: var(--accent-color);
}

/* Chat styles */
#chat-container {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.chat-header {
    text-align: center;
    margin-bottom: 30px;
}

.chat-header h1 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
}

.chat-header p {
    color: var(--text-secondary);
    margin: 10px 0 0;
    font-size: 1.1rem;
}

.chat-rules {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-rules h2 {
    color: var(--text-color);
    margin: 0 0 15px;
    font-size: 1.3rem;
}

.chat-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.chat-rules li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.chat-rules li i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* Message styles */
.message {
    display: flex;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 12px;
    background-color: var(--hover-color);
    max-width: 85%;
    align-self: flex-start;
    transition: all 0.3s ease;
    position: relative;
}

.message.own {
    align-self: flex-end;
    background-color: var(--accent-color);
}

.message img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.message-text {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

/* Input styles */
.input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background-color: var(--primary-color);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.message-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.send-button {
    padding: 12px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.send-button:hover {
    background-color: #357abd;
    transform: translateY(-1px);
}

.send-button i {
    font-size: 1.1rem;
}

/* Moderator controls */
.mod-controls {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    gap: 8px;
}

.mod-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mod-controls button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.message:hover .mod-controls {
    display: flex;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        margin: 0;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .profile-section {
        width: 100%;
        justify-content: center;
    }

    #logout-btn {
        width: 100%;
        justify-content: center;
    }

    .main-content {
        margin-top: 180px;
        padding: 1rem;
    }

    .settings-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .chat-page {
        padding: 15px;
    }

    .chat-header h1 {
        font-size: 2rem;
    }

    .chat-rules ul {
        grid-template-columns: 1fr;
    }

    .message {
        max-width: 95%;
    }
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Apply animations to main content */
.main-content > * {
    animation: fadeIn 0.5s var(--click-animation);
}

/* Apply animations to buttons */
button {
    animation: scaleIn 0.3s var(--click-animation);
}

/* Admin button styles */
.admin-btn {
    background-color: var(--admin-color);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s var(--click-animation);
    display: none; /* Hidden by default */
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.admin-btn:active {
    transform: translateY(0);
}

.admin-btn i {
    margin-right: 0.5rem;
}

/* Admin section styles */
.admin-section {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.admin-section h2 {
    color: var(--admin-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Test button styles */
.test-button {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s var(--click-animation);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.test-button:active {
    transform: translateY(0);
}

.test-button i {
    font-size: 1.8rem;
}

/* Flash effect */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.1s ease;
}

.flash-overlay.active {
    opacity: 1;
}

/* Username Prompt Styles */
.username-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.username-prompt-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.username-prompt h3 {
    margin: 0 0 1rem 0;
    color: #333;
}

.username-prompt p {
    margin: 0 0 1.5rem 0;
    color: #666;
}

.username-prompt input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.username-prompt button {
    background-color: #4CAF50;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.username-prompt button:hover {
    background-color: #45a049;
}

.error-message {
    color: #ff0000;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

/* User Type Display Styles */
#profile-name {
    font-size: 1.15rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 0.3px;
}

#profile-type {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-top: 0.1rem;
}

/* Footer styles */
footer {
    background-color: var(--bg-secondary);
    padding: 1.5rem 2rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

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

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s var(--click-animation);
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-links a:active {
    transform: translateY(0);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-right > * {
    margin: 0;
} 