/* Base Styles with Pastel Matte Color Scheme */
:root {
    --primary-color: #f7c9c9; /* Pastel Pink */
    --secondary-color: #a6dcef; /* Pastel Blue */
    --tertiary-color: #c3aed6; /* Pastel Purple */
    --quaternary-color: #b5ead7; /* Pastel Green */
    
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #4a4a4a;
    --border-color: #e0e0e0;
    --upvote-color: #f7c9c9;
    --button-hover: #f0f0f0;
    --header-background: #c3aed6;
    --header-text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.2s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-bottom: 2rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button:hover {
    background-color: var(--tertiary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

/* Header Styles */
header {
    background-color: var(--header-background);
    color: var(--header-text);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

header h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#user-balance {
    font-weight: bold;
    color: #ffffff;
    background-color: var(--quaternary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

nav {
    background-color: #d8c3e5;
    padding: 0.5rem 1rem;
}

nav ul {
    display: flex;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

nav li {
    margin-right: 1.5rem;
}

nav a {
    color: #4a4a4a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.25rem 0;
    position: relative;
}

nav a:hover, nav a.active {
    color: #333;
}

nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

nav a:hover:after, nav a.active:after {
    width: 100%;
}

/* Main Content Styles */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.section-container {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Filter Styles */
.filter-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: white;
    color: var(--text-color);
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Prediction Card Styles */
.prediction-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.prediction-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.prediction-header {
    display: flex;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #f9f9f9;
}

.upvote-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 1rem;
    min-width: 40px;
}

.upvote-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #aaa;
    transition: color 0.2s, transform 0.2s;
}

.upvote-button:hover {
    color: var(--upvote-color);
    transform: scale(1.2);
}

.upvote-button.upvoted {
    color: var(--upvote-color);
}

.upvote-count {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-color);
}

.prediction-title {
    flex-grow: 1;
}

.prediction-title h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.prediction-meta {
    font-size: 0.8rem;
    color: #888;
}

.prediction-body {
    padding: 1rem;
}

.prediction-description {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

.prediction-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.option-row:hover {
    background-color: #f0f0f0;
}

.option-text {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-color);
}

.option-odds {
    font-size: 0.85rem;
    color: #666;
    background-color: var(--quaternary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.bet-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bet-button:hover {
    background-color: var(--tertiary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.prediction-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background-color: #f9f9f9;
    font-size: 0.85rem;
    color: #666;
}

/* Tabs Styles */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-button:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.tab-button.active {
    border-bottom: 2px solid var(--primary-color);
    font-weight: bold;
    color: var(--primary-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: #f9f9f9;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(166, 220, 239, 0.3);
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.option-input {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.remove-option {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    margin-left: 0.75rem;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.remove-option:hover {
    transform: scale(1.2);
}

/* Modal Styles */
.modal {
    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;
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.prediction-detail-content {
    max-width: 700px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s, transform 0.2s;
}

.close-modal:hover {
    color: #666;
    transform: scale(1.1);
}

/* Leaderboard Styles */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table th {
    background-color: var(--quaternary-color);
    font-weight: bold;
    color: var(--text-color);
}

.leaderboard-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.leaderboard-table tr:hover {
    background-color: #f0f0f0;
}

.rank {
    font-weight: bold;
    text-align: center;
    background-color: var(--tertiary-color);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* About Section Styles */
#about-section h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--tertiary-color);
    font-size: 1.2rem;
}

#about-section ol {
    padding-left: 1.5rem;
}

#about-section li {
    margin-bottom: 0.75rem;
}

#trending-topics {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.trending-topic {
    padding: 1rem;
    border-radius: 8px;
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.trending-topic:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    background-color: var(--quaternary-color);
    color: var(--text-color);
    margin-left: 0.5rem;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--header-background);
    color: white;
    font-size: 0.85rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #user-info {
        margin-top: 0.75rem;
        width: 100%;
        justify-content: space-between;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    nav li {
        margin-bottom: 0.5rem;
    }
    
    .filter-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex-grow: 1;
        text-align: center;
    }
    
    .trending-topic {
        grid-template-columns: 1fr;
    }
}
