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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Page Container */
.page {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Home Page Styles */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.logo-section {
    text-align: center;
    margin-bottom: 60px;
    padding-top: 60px;
}

.logo-icon {
    font-size: 72px;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.logo-text {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Search Section */
.search-section {
    margin-bottom: 60px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 15px 25px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 20px;
    margin-right: 15px;
}

#keywordInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 400;
}

#keywordInput::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    background: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--surface-light);
}

.suggestion-keyword {
    font-weight: 500;
    color: var(--text-primary);
}

.suggestion-users {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Trending Section */
.trending-section {
    margin-top: 80px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--warning);
}

.trending-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trending-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
}

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

.trending-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.2);
}

.trending-rank {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 35px;
}

.trending-rank.top {
    background: linear-gradient(135deg, var(--warning), #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trending-content {
    flex: 1;
    margin: 0 12px;
}

.trending-keyword {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trending-keyword .fa-lock {
    font-size: 13px;
    color: var(--secondary-color);
}

.trending-stats {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-item i {
    font-size: 11px;
}

.trending-arrow {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-item {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s ease; /* Smooth transition for stat updates */
}

.stat-item span {
    transition: opacity 0.2s ease; /* Smooth number changes */
}

.stat-item i {
    color: var(--primary-color);
}

.trending-arrow {
    font-size: 24px;
    color: var(--text-secondary);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.loading span {
    display: block;
    font-size: 16px;
}

/* Chat Page Styles */
.chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

.chat-header {
    background: var(--surface);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.back-btn:hover {
    background: var(--surface-light);
}

/* Tooltip for back button */
.back-btn::after {
    content: '대화방 나가기';
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.back-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

.chat-info {
    flex: 1;
}

.chatroom-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.active-users {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.active-users i {
    color: var(--success);
}

/* Search Toggle Button */
.search-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.search-toggle-btn:hover {
    background: var(--surface-light);
}

.search-toggle-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Search Bar */
.search-bar {
    background: var(--surface);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.search-bar.hidden {
    display: none;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-input {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    font-size: 16px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.clear-search-btn.hidden {
    display: none;
}

.search-results {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-results.hidden {
    display: none;
}

#searchCount {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 80px;
}

.search-nav-btn {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.search-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Search Highlight */
.search-highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-highlight.active {
    background-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Search Result Message Highlight */
.search-result-message {
    position: relative;
    animation: fadeIn 0.3s ease;
}

.search-result-active {
    background-color: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: 17px !important;
    transition: all 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading Indicator for Infinite Scroll */
.load-more-indicator {
    text-align: center;
    padding: 15px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    background: var(--surface);
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.load-more-indicator.hidden {
    display: none;
}

.load-more-indicator i {
    font-size: 18px;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: var(--surface);
}

.messages-container::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

.welcome-message {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.welcome-message i {
    font-size: 24px;
    color: var(--primary-color);
}

.welcome-message p {
    font-size: 16px;
    margin: 0;
}

.message {
    display: flex;
    gap: 12px;
    animation: messageSlide 0.3s ease;
}

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

.message.own {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.message.own .message-avatar {
    background: var(--secondary-color);
}

.message-content {
    max-width: 60%;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.message.own .message-header {
    flex-direction: row-reverse;
}

.message-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

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

.message-bubble {
    background: var(--surface);
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    color: var(--text-primary);
    line-height: 1.5;
}

.message.own .message-bubble {
    background: var(--primary-color);
    color: white;
}

/* Message Input Section */
.message-input-section {
    padding: 20px;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
}

.username-section {
    display: flex;
    gap: 10px;
    align-items: center;
}

#usernameInput {
    flex: 1;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#usernameInput:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.message-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#messageInput {
    flex: 1;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#messageInput:focus {
    border-color: var(--primary-color);
}

.send-btn {
    background: var(--primary-color);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.attachment-btn {
    background: var(--surface-light);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-btn:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

/* Image Preview */
.image-preview {
    padding: 15px 20px;
    background: var(--background);
    border-top: 1px solid var(--border-color);
}

.preview-content {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.preview-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.remove-preview-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--danger);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-preview-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Message Images */
.message-image {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    object-fit: contain;
}

.message-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-modal-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Video Embed */
.message-video {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.message-video iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Vote Buttons */
.message-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

/* Desktop: Show on hover */
@media (hover: hover) {
    .message:hover .message-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Mobile: Show when active class is added */
@media (hover: none) {
    .message.vote-active .message-actions {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Always show if user has voted */
.message-actions.has-vote {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.vote-btn {
    background: var(--surface-light);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vote-btn:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.vote-btn.upvoted {
    background: var(--success);
    color: white;
}

.vote-btn.downvoted {
    background: var(--danger);
    color: white;
}

.vote-count {
    font-weight: 600;
}

/* Read-only vote counts for own messages */
.message-votes-readonly {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.vote-count-display {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vote-count-display i {
    font-size: 11px;
}

/* Blinded Message */
.message.blinded .message-bubble {
    background: var(--surface-light);
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.6;
}

/* Best Message */
.message.best {
    position: relative;
}

.message.best::before {
    content: '🏆 BEST';
    position: absolute;
    top: -10px;
    left: 50px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.message.best .message-bubble {
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

/* Warning Modal */
.warning-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.warning-modal {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.warning-modal.low {
    border-color: var(--warning);
}

.warning-modal.medium {
    border-color: #f59e0b;
}

.warning-modal.high {
    border-color: var(--danger);
}

.warning-modal.critical {
    border-color: #dc2626;
    background: linear-gradient(135deg, #1e293b 0%, #450a0a 100%);
}

.warning-modal.info {
    border-color: var(--primary-color);
}

.warning-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
}

.warning-modal h2 {
    color: var(--text-primary);
    font-size: 28px;
    text-align: center;
    margin-bottom: 20px;
}

.warning-content {
    margin-bottom: 30px;
}

.warning-count {
    text-align: center;
    font-size: 18px;
    color: var(--warning);
    font-weight: 600;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
}

.violations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.violation-item {
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--danger);
    color: var(--text-primary);
    font-size: 14px;
}

.violation-item strong {
    color: var(--danger);
    text-transform: uppercase;
    font-size: 12px;
}

.critical-warning {
    text-align: center;
    color: var(--danger);
    font-weight: 700;
    font-size: 16px;
    padding: 15px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 2px solid var(--danger);
}

.warning-guidelines {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.warning-guidelines h3 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-guidelines ul {
    list-style: none;
    padding: 0;
}

.warning-guidelines li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.warning-guidelines li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.guidelines-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.guidelines-content section {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
}

.guidelines-content h3 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 15px;
}

.guidelines-content ul {
    list-style: none;
    padding: 0;
}

.guidelines-content li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 14px;
}

.guidelines-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

.warning-modal .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* Private Chatroom Styles */
.private-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

.password-modal-content {
    text-align: left;
}

.modal-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 14px;
}

.chatroom-keyword {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 15px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
}

.chatroom-keyword i {
    color: var(--primary-color);
    font-size: 20px;
}

.chatroom-keyword strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Form Group Styles */
.password-modal-content .form-group {
    margin-bottom: 20px;
}

.password-modal-content .form-group label {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.password-modal-content .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.password-modal-content .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--background);
}

.password-modal-content .form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.private-chatroom-info {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 16px;
    border-radius: 10px;
    margin-top: 20px;
}

.private-chatroom-info h4 {
    color: var(--text-primary);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.private-chatroom-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.private-chatroom-info li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 13px;
    line-height: 1.5;
}

.private-chatroom-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 16px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--border-color);
}

.chatroom-title .fa-lock {
    color: var(--secondary-color);
    margin-right: 8px;
}

/* Room Selection Modal */
.room-selection-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.room-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.room-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.room-option.public i {
    font-size: 32px;
    color: var(--primary-color);
}

.room-option.private i {
    font-size: 32px;
    color: var(--secondary-color);
}

.room-option .option-content {
    flex: 1;
}

.room-option h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.room-option p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Chatroom Ad Styles */
.chatroom-ad-container {
    margin: 15px auto;
    padding: 15px;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 800px;
    text-align: center;
}

.chatroom-ad-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.chatroom-ad-container video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.chatroom-ad-container iframe {
    width: 100%;
    min-height: 250px;
    border: none;
    border-radius: 8px;
}

.chatroom-ad-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .logo-section {
        padding-top: 40px;
        margin-bottom: 40px;
    }

    .logo-icon {
        font-size: 56px;
    }

    .logo-text {
        font-size: 36px;
    }

    .tagline {
        font-size: 16px;
    }

    .search-box {
        padding: 12px 20px;
    }

    #keywordInput {
        font-size: 16px;
    }

    .section-title {
        font-size: 20px;
    }

    .trending-list {
        grid-template-columns: 1fr;
    }

    .trending-item {
        padding: 15px;
    }

    .trending-keyword {
        font-size: 16px;
    }

    .message-content {
        max-width: 75%;
    }

    .chatroom-title {
        font-size: 18px;
    }
    
    .message-image {
        max-width: 100%;
        max-height: 250px;
    }
    
    .image-modal-close {
        top: 20px;
        right: 20px;
    }
    
    .image-modal-info {
        bottom: 20px;
        font-size: 12px;
    }
}
