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

:root {
    --primary: #5865F2;
    --primary-hover: #4752C4;
    --secondary: #7289DA;
    --success: #43B581;
    --danger: #F04747;
    --warning: #FAA61A;
    --bg-primary: #2C2F33;
    --bg-secondary: #23272A;
    --bg-card: #36393F;
    --text-primary: #FFFFFF;
    --text-secondary: #B9BBBE;
    --text-muted: #72767D;
    --border: #202225;
    --upvote: #FF6B35;
    --downvote: #7C7C7C;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

header {
    background: var(--bg-primary);
    padding: 1rem 0;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

.header-stats {
    display: flex;
    gap: 2rem;
}

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

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

main {
    padding: 2rem 0;
}

.info-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.info-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text {
    font-size: 0.95rem;
    line-height: 1.4;
}

.highlight {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.submit-section {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.submit-section h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#promptInput {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

#promptInput:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.validation-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-idle {
    color: var(--text-muted);
}

.status-checking {
    color: var(--warning);
}

.status-checking::before {
    content: '⏳ ';
}

.status-approved {
    color: var(--success);
}

.status-approved::before {
    content: '✅ ';
}

.status-rejected {
    color: var(--danger);
}

.status-rejected::before {
    content: '❌ ';
}

#submitBtn {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#submitBtn:hover:not(:disabled) {
    background: var(--primary-hover);
}

#submitBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    color: var(--text-secondary);
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-subtitle {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 2px;
}

.tab-btn.active .tab-subtitle {
    color: rgba(88, 101, 242, 0.8);
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 6px;
}

.sort-bar span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sort-btn {
    padding: 6px 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.sort-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.sort-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.voting-reminder {
    margin-bottom: 1.5rem;
}

.reminder-box {
    background: linear-gradient(135deg, var(--warning), #FFB347);
    color: var(--bg-secondary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(250, 166, 26, 0.2);
}

.reminder-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.reminder-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.vote-number {
    background: var(--bg-secondary);
    color: var(--warning);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
}

.prompts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prompt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s;
}

.prompt-card:hover {
    border-color: var(--primary);
}

.vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 60px;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.vote-btn.upvote:hover {
    color: var(--upvote);
}

.vote-btn.upvote.voted {
    color: var(--upvote);
}

.vote-count {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.prompt-content {
    flex: 1;
}

.prompt-text {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.prompt-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.prompt-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.progress-bar {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-label {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.progress-label.ready {
    color: var(--success);
    font-weight: 600;
}

.progress-label.ready::before {
    content: "🎉 ";
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-prompt {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

#modalPrompt {
    margin-top: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 0 2rem;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-stats {
        gap: 1rem;
        font-size: 0.8rem;
    }
    
    .submit-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

