/* Yorkshire Dales Guitar Trip - Herfst in Engeland Theme */

:root {
    /* Warm autumn palette - falling leaves & cozy pubs */
    --autumn-orange: #C4652A;
    --autumn-rust: #A0522D;
    --autumn-gold: #D4A534;
    --autumn-yellow: #E8B84A;
    --leaf-brown: #8B4513;
    --deep-brown: #5D3A1A;
    --bark-brown: #4A3728;
    --warm-cream: #FDF5E6;
    --parchment: #F5E6D3;
    --moss-green: #6B7B4C;
    --fern-green: #4A5D32;
    --misty-grey: #9B9588;
    --stone-light: #D4CFC5;
    --cozy-red: #8B3A3A;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-accent: 'EB Garamond', Georgia, serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--warm-cream);
    color: var(--bark-brown);
    line-height: 1.7;
    min-height: 100vh;
    background-image:
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4652A' fill-opacity='0.06'%3E%3Cpath d='M40 40c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20zm20 20c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Header */
header {
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--leaf-brown) 50%, var(--autumn-rust) 100%);
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(93, 58, 26, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo h1 {
    font-family: var(--font-heading);
    color: var(--warm-cream);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.logo-icon {
    font-size: 2rem;
}

nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--parchment);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-family: var(--font-accent);
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

nav a:hover, nav a.active {
    background: rgba(212, 165, 52, 0.25);
    color: var(--autumn-yellow);
    border-color: rgba(212, 165, 52, 0.4);
}

nav a.logout {
    border: 1px solid var(--misty-grey);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: calc(100vh - 200px);
}

/* Page Title */
.page-title {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--autumn-gold);
}

.page-title h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--deep-brown);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.page-title p {
    color: var(--autumn-rust);
    font-style: italic;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--parchment);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(93, 58, 26, 0.12);
    border: 1px solid var(--stone-light);
    border-left: 4px solid var(--autumn-orange);
}

.card h3 {
    font-family: var(--font-heading);
    color: var(--leaf-brown);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 1px solid var(--autumn-gold);
    padding-bottom: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-accent);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--autumn-orange) 0%, var(--autumn-rust) 100%);
    color: var(--warm-cream);
    box-shadow: 0 2px 8px rgba(196, 101, 42, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--autumn-rust) 0%, var(--leaf-brown) 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--stone-light);
    color: var(--deep-brown);
}

.btn-secondary:hover {
    background: var(--misty-grey);
    color: var(--warm-cream);
}

.btn-danger {
    background: var(--cozy-red);
    color: var(--warm-cream);
}

.btn-danger:hover {
    background: #6B2A2A;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--leaf-brown);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--stone-light);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--warm-cream);
    color: var(--bark-brown);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--autumn-orange);
    box-shadow: 0 0 0 3px rgba(196, 101, 42, 0.15);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Login Page */
.login-container {
    max-width: 420px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.login-card {
    background: linear-gradient(180deg, var(--parchment) 0%, var(--warm-cream) 100%);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(93, 58, 26, 0.2);
    border: 1px solid var(--autumn-gold);
    text-align: center;
}

.login-card h1 {
    font-family: var(--font-heading);
    color: var(--deep-brown);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.login-card .subtitle {
    color: var(--autumn-rust);
    margin-bottom: 2rem;
    font-style: italic;
}

.login-card .guitar-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.login-card .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Flash Messages */
.flash-messages {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
}

.flash {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.flash.success {
    background: rgba(107, 123, 76, 0.2);
    border: 1px solid var(--moss-green);
    color: var(--fern-green);
}

.flash.error {
    background: rgba(139, 58, 58, 0.15);
    border: 1px solid var(--cozy-red);
    color: var(--cozy-red);
}

.flash.warning {
    background: rgba(212, 165, 52, 0.2);
    border: 1px solid var(--autumn-gold);
    color: var(--leaf-brown);
}

.flash.info {
    background: rgba(196, 101, 42, 0.15);
    border: 1px solid var(--autumn-orange);
    color: var(--autumn-rust);
}

/* Music Player */
.audio-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-item {
    background: var(--warm-cream);
    border: 1px solid var(--stone-light);
    border-left: 3px solid var(--autumn-gold);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.audio-item .audio-icon {
    font-size: 2rem;
    color: var(--autumn-orange);
}

.audio-item .audio-info {
    flex: 1;
    min-width: 0;
}

.audio-item .audio-title {
    font-weight: 600;
    color: var(--deep-brown);
    margin-bottom: 0.25rem;
}

.audio-item .audio-meta {
    font-size: 0.85rem;
    color: var(--misty-grey);
}

.audio-item audio {
    flex: 2;
    min-width: 0;
    width: 100%;
    max-width: 400px;
    height: 40px;
}

.audio-item .delete-btn {
    opacity: 0.6;
    transition: opacity 0.3s;
}

.audio-item:hover .delete-btn {
    opacity: 1;
}

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

.gallery-item {
    background: var(--warm-cream);
    border: 1px solid var(--stone-light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(93, 58, 26, 0.2);
}

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

.gallery-item .caption {
    padding: 1rem;
    text-align: center;
    color: var(--leaf-brown);
    font-style: italic;
}

.gallery-item .gallery-actions {
    padding: 0 1rem 1rem;
    text-align: center;
}

/* Lightbox Carousel */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 30, 15, 0.97);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 85%;
    max-height: 85%;
    cursor: pointer;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    cursor: default;
}

.lightbox-caption {
    color: var(--warm-cream);
    font-family: var(--font-accent);
    font-size: 1rem;
    margin-top: 1rem;
    text-align: center;
    max-width: 600px;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--warm-cream);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1001;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--warm-cream);
    font-size: 3rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--warm-cream);
    font-family: var(--font-accent);
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 2rem;
        padding: 0.5rem 1rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

/* Travel Info */
.travel-section {
    margin-bottom: 2.5rem;
}

.travel-section h3 {
    font-family: var(--font-heading);
    color: var(--leaf-brown);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.travel-section .icon {
    font-size: 1.5rem;
}

.location-list {
    list-style: none;
}

.location-list li {
    padding: 1rem;
    background: var(--warm-cream);
    border: 1px solid var(--stone-light);
    border-left: 3px solid var(--autumn-gold);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.location-list li strong {
    color: var(--autumn-rust);
}

.travel-notes {
    background: var(--warm-cream);
    border-left: 4px solid var(--autumn-orange);
    padding: 1.5rem;
    border-radius: 0 6px 6px 0;
    white-space: pre-wrap;
}

/* Map Container */
.map-container {
    background: var(--warm-cream);
    border: 1px solid var(--stone-light);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.map-container iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.map-placeholder {
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--misty-grey);
    text-align: center;
    padding: 2rem;
}

.map-placeholder .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--autumn-gold);
    border-radius: 8px;
    padding: 2.5rem;
    text-align: center;
    background: var(--warm-cream);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--autumn-orange);
    background: rgba(196, 101, 42, 0.05);
}

.upload-zone .icon {
    font-size: 3rem;
    color: var(--autumn-rust);
    margin-bottom: 1rem;
}

.upload-zone input[type="file"] {
    display: none;
}

/* Manage Page Tabs */
.manage-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--autumn-gold);
    padding-bottom: 1rem;
}

.manage-tabs button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: 1px solid var(--stone-light);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-accent);
    font-size: 1rem;
    color: var(--misty-grey);
    transition: all 0.3s ease;
}

.manage-tabs button:hover {
    border-color: var(--autumn-orange);
    color: var(--autumn-orange);
}

.manage-tabs button.active {
    background: linear-gradient(135deg, var(--autumn-orange) 0%, var(--autumn-rust) 100%);
    color: var(--warm-cream);
    border-color: var(--autumn-orange);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* User List */
.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.user-tag {
    background: var(--warm-cream);
    border: 1px solid var(--autumn-gold);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-tag .delete-user {
    background: none;
    border: none;
    color: var(--cozy-red);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

/* Location Editor */
.location-editor {
    margin-top: 1rem;
}

.location-item-edit {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: start;
}

.location-item-edit input {
    padding: 0.6rem;
    border: 1px solid var(--stone-light);
    border-radius: 4px;
    font-family: var(--font-body);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--misty-grey);
}

.empty-state .icon {
    font-size: 4rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--deep-brown) 0%, var(--leaf-brown) 100%);
    color: var(--stone-light);
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    font-size: 0.9rem;
}

footer .quote {
    font-style: italic;
    margin-bottom: 0.5rem;
    color: var(--autumn-yellow);
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        justify-content: center;
    }

    .page-title h2 {
        font-size: 1.8rem;
    }

    .audio-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .audio-item .audio-icon {
        display: none;
    }

    .audio-item .audio-info {
        width: 100%;
    }

    .audio-item audio {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 40px;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .audio-item .btn-inline-delete {
        align-self: center;
    }

    .location-item-edit {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    main {
        padding: 1.5rem 1rem;
    }

    .card {
        padding: 1rem;
        overflow: visible;
    }

    .audio-list {
        overflow: visible;
    }

    .audio-item {
        overflow: visible;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--warm-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--autumn-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--autumn-orange);
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--stone-light);
    border-radius: 50%;
    border-top-color: var(--autumn-orange);
    animation: spin 1s linear infinite;
}

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

/* Autumn leaf decoration */
.card::before {
    content: "🍂";
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.card {
    position: relative;
}
