/* 
 * BNI Champions Trophy 2025 - Prediction System
 * Main Stylesheet
 */

/* General Styles */
:root {
    --primary: #d40023;
    --secondary: #fa5d5d;
    --text: #111827;
    --background: #f8f0f1;
    --card: #ffffff;
    --accent: #ff8d8d;
    --error: #ff3b3b;
    --success: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* Prediction Card */
.prediction-card {
    background-color: var(--card);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, #ff3a54 100%);
    padding: 2rem;
    color: white;
    text-align: center;
    position: relative;
}

.card-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.card-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.trophy-icon {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.logo {
    height: 40px;
    margin-bottom: 1rem;
}

.card-body {
    padding: 2rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(250, 93, 93, 0.2);
}

.prediction-section {
    background-color: rgba(212, 0, 35, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 2px dashed var(--primary);
}

.prediction-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.3rem;
}

.prediction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .prediction-grid {
        grid-template-columns: 1fr;
    }
}

.submit-btn, .back-btn, .export-btn, .view-all-btn, .search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #ff3a54 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(212, 0, 35, 0.2);
    text-align: center;
    text-decoration: none;
}

.submit-btn:hover, .back-btn:hover, .export-btn:hover, .view-all-btn:hover, .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(212, 0, 35, 0.3);
}

.back-btn {
    background: #666;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Terms and Conditions */
.terms-section {
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.terms-section h4 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.terms-content {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}

.terms-content ol {
    padding-left: 1.5rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
}

.terms-acceptance {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.terms-acceptance input {
    width: auto;
    margin-right: 0.5rem;
}

.terms-acceptance label {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Success Page */
.success-card .trophy-icon {
    font-size: 5rem;
}

.success-message {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.prediction-summary {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.prediction-summary h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
}

.summary-item {
    display: flex;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

.summary-item .label {
    font-weight: 600;
    width: 40%;
    color: #666;
}

.summary-item .value {
    width: 60%;
}

.success-footer {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

/* Admin Styles */
.admin-page .container {
    max-width: 1000px;
}

.admin-header {
    position: relative;
}

.admin-nav {
    display: flex;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.admin-nav a {
    padding: 1rem;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
}

.admin-nav a:hover {
    background-color: #f0f0f0;
    color: var(--primary);
}

.admin-nav a.active {
    background-color: #fff;
    color: var(--primary);
    box-shadow: 0 2px 0 var(--primary);
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-box:first-child {
    grid-column: 1 / -1;
    text-align: center;
}

.stat-box h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-label {
    width: 100px;
    font-size: 0.9rem;
    color: #666;
}

.chart-bar {
    flex: 1;
    height: 12px;
    background-color: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 6px;
}

.chart-value {
    width: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

.recent-entries {
    margin-top: 1.5rem;
}

.recent-entries h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: #666;
    background-color: #f8f8f8;
}

.data-table tr:hover {
    background-color: #f8f8f8;
}

.view-all {
    margin-top: 1.5rem;
    text-align: center;
}

.view-all-btn {
    display: inline-block;
    width: auto;
    margin: 0 auto;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
}

.search-btn {
    width: auto;
    margin: 0;
    padding: 0.75rem 1rem;
}

.clear-search {
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.entries-count {
    margin-bottom: 1rem;
    color: #666;
}

.table-responsive {
    overflow-x: auto;
}

.entries-table th, .entries-table td {
    white-space: nowrap;
}

.export-container {
    background-color: #f8f8f8;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.export-container h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.export-options {
    margin: 1.5rem 0;
}

.export-info {
    margin-top: 2rem;
    font-size: 0.9rem;
}

.export-info h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.export-info ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.export-info li {
    margin-bottom: 0.25rem;
}

.error-message {
    background-color: #ffebeb;
    border-left: 4px solid var(--error);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #d32f2f;
}

.error-message ul {
    padding-left: 1.5rem;
}

.no-entries {
    text-align: center;
    padding: 2rem;
    color: #666;
}

footer {
    background-color: #f1f1f1;
    padding: 1rem 0;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content p {
    margin: 0.25rem 0;
}

.powered-by {
    font-weight: 600;
}

.powered-by a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.powered-by a:hover {
    text-decoration: underline;
    color: #ff3a54;
}

/* Mobile Input Group */
.mobile-input-group {
    display: flex;
    gap: 0.5rem;
}

.mobile-input-group select {
    width: 30%;
    flex-shrink: 0;
}

.mobile-input-group input {
    flex-grow: 1;
}
    position: absolute;
    z-index: 0;
    opacity: 0.1;
}

.decoration-2 {
    bottom: 10%;
    right: 5%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--accent);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--secondary);
    animation: fall 5s linear infinite;
}

.confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background-color: #fa5d5d;
}

.confetti:nth-child(2) {
    left: 30%;
    animation-delay: 1.5s;
    background-color: #ff8d8d;
}

.confetti:nth-child(3) {
    left: 50%;
    animation-delay: 3s;
    background-color: #d40023;
}

.confetti:nth-child(4) {
    left: 70%;
    animation-delay: 4.5s;
    background-color: #ff3a54;
}

.confetti:nth-child(5) {
    left: 90%;
    animation-delay: 6s;
    background-color: #fa5d5d;
}

@keyframes fall {
    0% {
        top: -10px;
        transform: rotate(0deg);
    }
    100% {
        top: 100%;
        transform: rotate(360deg);
    }
}