/* DestinyGuessr - Main Stylesheet */

/* Global Styles */
:root {
    --primary-color: #5ea5c2; /* Destiny blue */
    --secondary-color: #232b3a; /* Darker blue-gray */
    --accent-color: #cabf9f; /* Destiny gold/yellow */
    --background: #0c0f18; /* Very dark blue */
    --background-gradient: linear-gradient(135deg, #0e1320 0%, #171e2d 100%);
    --text-color: #ebeef5;
    --border-color: #374357;
    --success-color: #7fc979;
    --error-color: #d14444;
    --warning-color: #e9b44c;
    --border-glow: 0 0 10px rgba(94, 165, 194, 0.5);
    --destiny-font: 'Titillium Web', 'Arial', sans-serif; /* Titillium Web is similar to Destiny's font */
}

@font-face {
    font-family: 'Destiny Icons';
    src: url('../assets/destiny-icons.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: var(--destiny-font);
    background-color: var(--background);
    background-image: var(--background-gradient);
    color: var(--text-color);
    line-height: 1.5;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/bg-pattern.avif');
    background-repeat: repeat;
    background-size: 200px;
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}

.container, .game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    left: 25%;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right,
        transparent,
        var(--accent-color),
        transparent);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 50px;
    margin-right: 10px;
    margin-bottom: 5px;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(94, 165, 194, 0.7);
}

h1::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    box-shadow: 0 0 10px rgba(202, 191, 159, 0.8);
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--accent-color);
}

p {
    margin-bottom: 0.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1),
                0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2),
                0 5px 15px rgba(94, 165, 194, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn:disabled {
    background-color: #3a3a3a;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Home Page Styles */
.game-intro {
    text-align: center;
    margin-bottom: 3rem;
    background-color: rgba(35, 43, 58, 0.5);
    padding: 2rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.game-intro p {
    max-width: 600px;
    margin: 0 auto 0.5rem;
}

.game-intro .btn {
    padding: 1rem 2rem;
    font-size: 1.3rem;
    margin-top: 1rem;
}

.how-to-play {
    max-width: 700px;
    margin: 0 auto;
    background-color: rgba(35, 43, 58, 0.7);
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    position: relative;
}

.how-to-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

.how-to-play ol {
    margin-left: 2rem;
}

.how-to-play li {
    margin-bottom: 0.5rem;
    position: relative;
}

.how-to-play li::marker {
    color: var(--accent-color);
    font-weight: bold;
}

/* Game Page Styles */
.game-container {
    height: 100vh;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    background: rgba(35, 43, 58, 0.4);
    padding: 0.7rem 20rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Timer styles */
.timer {
    font-weight: 700;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#time-remaining {
    font-size: 1.3rem;
    min-width: 25px;
    text-align: center;
    transition: color 0.3s ease;
    color: var(--text-color);
}

/* Timer state colors */
.timer[data-time="normal"] {
    color: var(--text-color);
}

.timer[data-time="warning"] {
    color: var(--warning-color);
}

.timer[data-time="danger"] {
    color: var(--error-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.image-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 1rem;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    position: relative;
}

.image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 1;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(14, 19, 32, 0.2),
        transparent,
        rgba(14, 19, 32, 0.4));
    z-index: 2;
    pointer-events: none;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guess-interface {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.guess-step {
    background-color: rgba(35, 43, 58, 0.7);
    padding: 1.0rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.guess-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.destination-options, .area-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.destination-option, .area-option {
    background-color: var(--secondary-color);
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.destination-option::before, .area-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.destination-option:hover::before, .area-option:hover::before {
    opacity: 1;
}

.destination-option:hover, .area-option:hover {
    background-color: #2d3747;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.destination-option.selected, .area-option.selected {
    background-color: var(--primary-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(94, 165, 194, 0.4);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.result-feedback {
    background-color: rgba(35, 43, 58, 0.7);
    padding: 1.0rem;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
}

.result-feedback::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        var(--primary-color),
        transparent);
}

.correct {
    color: var(--success-color);
    font-weight: bold;
}

.incorrect {
    color: var(--error-color);
    font-weight: bold;
}

/* Results Page Styles */
.results-summary {
    text-align: center;
    margin-bottom: 3rem;
}

.final-score {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(94, 165, 194, 0.5);
}

.time-info {
    background-color: rgba(35, 43, 58, 0.7);
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem auto;
    max-width: 400px;
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    font-weight: 600;
}

#time-remaining-display {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.rank-badge {
    background-color: rgba(35, 43, 58, 0.7);
    padding: 2rem;
    border-radius: 5px;
    margin: 0 auto;
    max-width: 500px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.rank-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--accent-color), transparent);
}

#rank-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.round-breakdown {
    background-color: rgba(35, 43, 58, 0.7);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.round-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.round-result:hover {
    background-color: rgba(94, 165, 194, 0.1);
}

.round-result:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 25%;
    width: 50%;
    height: 1px;
    background: linear-gradient(to right,
        transparent,
        var(--accent-color),
        transparent);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .image-container {
        height: 300px;
    }

    .destination-options, .area-options {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .game-stats {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 0.7rem 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    .image-container {
        height: 250px;
    }

    .container, .game-container {
        padding: 1rem;
    }

    .btn {
        width: 100%;
    }
}

/* Image info display */
.image-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
    font-size: 0.9rem;
    font-weight: 600;
}

.image-id {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 5px;
    backdrop-filter: blur(2px);
}

.image-credit {
    background-color: rgba(35, 43, 58, 0.7);
    color: rgba(235, 238, 245, 0.8);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    margin-left: 5px;
}

.image-difficulty {
    padding: 4px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(2px);
}

.difficulty-easy {
    background-color: rgba(0, 128, 0, 0.5); /* Green for easy */
    color: #ffffff;
}

.difficulty-medium {
    background-color: rgba(255, 165, 0, 0.5); /* Orange for medium */
    color: #ffffff;
}

.difficulty-hard {
    background-color: rgba(255, 0, 0, 0.5); /* Red for hard */
    color: #ffffff;
}

/* Submission Form Styles */
.submission-form {
    background-color: rgba(35, 43, 58, 0.5);
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.submission-form p {
    margin-bottom: 1rem;
}

.submission-form label {
    display: flex;
    flex-direction: column;
}

.submission-form span {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.submission-form input,
.submission-form select,
.submission-form textarea {
    background-color: rgba(12, 15, 24, 0.7);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--destiny-font);
}

.submission-form input:focus,
.submission-form select:focus,
.submission-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(94, 165, 194, 0.3);
}

.submission-form input[type="file"] {
    padding: 0.5rem;
    border: 1px dashed var(--border-color);
    background-color: rgba(12, 15, 24, 0.4);
}

.submission-guidelines {
    margin-bottom: 1.5rem;
}

.submission-guidelines ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.submission-guidelines li {
    margin-bottom: 0.5rem;
    position: relative;
}

.submission-result {
    margin: 1rem 0;
    font-weight: 600;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .submission-form label {
        flex-direction: column;
    }

    .submission-form span {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Report Problem Form Styles */
.report-problem-container {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

#report-problem-btn {
    background-color: rgba(35, 43, 58, 0.8);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.5rem;
}

#report-problem-btn:hover {
    background-color: var(--secondary-color);
}

.report-form {
    background-color: rgba(35, 43, 58, 0.8);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.report-form h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.report-form form p {
    margin-bottom: 0.75rem;
}

.report-form label {
    display: flex;
    flex-direction: column;
}

.report-form span {
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.report-form select,
.report-form textarea {
    background-color: rgba(12, 15, 24, 0.7);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 5px;
    color: var(--text-color);
    font-family: var(--destiny-font);
    font-size: 0.9rem;
}

.report-form select:focus,
.report-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(94, 165, 194, 0.3);
}

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

.form-buttons button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.report-result {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Game options styles */
.game-options {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.toggle-option {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.toggle-label {
    margin-left: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: var(--text-color);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Game Modes */
.game-modes {
    margin: 1rem 0;
    text-align: center;
}

.game-modes h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #f5f5f5;
}

.mode-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.mode-option {
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid #555;
    border-radius: 8px;
    padding: 1rem;
    width: 200px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.mode-option.selected {
    border-color: var(--accent-color);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 206, 41, 0.3);
}

.mode-option h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.mode-option p {
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.mode-icon {
    font-size: 2rem;
    margin: 0.5rem 0;
}

.mode-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #ff5722;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transform: rotate(5deg);
}
