:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --accent-color: #00ffff;
    /* Cyan Neon */
    --accent-hover: #00cccc;
    --danger-color: #ff4444;
    --border-color: #404040;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3 {
    margin-top: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    width: 100%;
}

/* Forms */
input,
select,
button {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: #333;
    color: white;
    width: 100%;
}

button {
    background-color: var(--accent-color);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

button:hover {
    background-color: var(--accent-hover);
}

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

.form-group {
    margin-bottom: 15px;
}

/* Cards & Lists */
.card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.setlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.setlist-card {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.setlist-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

/* No seu arquivo style.css */
.btn-revoke {
    background-color: transparent !important;
    border: 1px solid #ff4444 !important;
    color: #ff4444 !important;
    transition: 0.3s;
}

.btn-revoke:hover {
    background-color: #ff4444 !important;
    color: white !important;
}

/* Song List (Sortable) */
.song-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.song-item {
    background-color: #333;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    border-left: 4px solid var(--accent-color);
    flex-wrap: wrap;
}

.song-item:active {
    cursor: grabbing;
}

.song-details {
    flex-grow: 1;
}

.song-title {
    font-weight: bold;
    font-size: 1.1em;
}

.song-meta {
    font-size: 0.9em;
    color: #aaa;
}

.handle {
    margin-right: 15px;
    color: #666;
    cursor: grab;
}

/* Event Badges */
.event-badge {
    display: block;
    width: 100%;
    margin-top: 5px;
    background-color: #d32f2f;
    /* Red base */
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 4px;
    text-align: center;
}

/* Footer */
.site-footer {
    background-color: #111;
    color: #666;
    text-align: center;
    padding: 20px 0;
    font-size: 0.85em;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    width: 100%;
}

.site-footer .container {
    text-align: center;
    justify-content: center;
    display: block;
    /* Ensure block for centering text */
}

.site-footer a {
    color: #666;
    /* Same as footer text */
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #88ccff;
    /* Light Blue on Hover */
}

/* Delete Song Button */
.delete-song-btn {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 10px;
    padding: 5px;
    line-height: 1;
}

.delete-song-btn:hover {
    color: var(--danger-color);
}

/* Modal / Lightbox */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 15% auto;
    padding: 30px;
    border: 1px solid var(--accent-color);
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-modal:hover {
    color: white;
}

.pix-key {
    background: black;
    padding: 15px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 1.1em;
    margin: 20px 0;
    color: var(--accent-color);
    border: 1px dashed #555;
    word-break: break-all;
}

/* Autocomplete Suggestions */
.autocomplete-suggestions {
    border: 1px solid #444;
    background: #333;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    width: 100%;
    z-index: 999;
    top: 100%;
    left: 0;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.autocomplete-suggestion {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #444;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: var(--accent-color);
    color: #000;
}

.autocomplete-wrapper {
    position: relative;
    flex: 2;
    /* Match input flex */
    min-width: 200px;
}

/* User Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    border: 1px solid #444;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #444;
    color: var(--accent-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-trigger:after {
    content: '▼';
    font-size: 0.8em;
}

/* Utilities */
.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
    gap: 10px;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* Header Alignment Logic */
/* By default, site-header container is flex justify-between.
   Left items should be in one group, Right items in another.
   We updated index.php and setlist.php to group them correctly.
   So standard justify-between works.
*/

/* Print Mode (Stage Mode) - Optimized for 22+ songs */
@media print {
    @page {
        margin: 0.5cm;
        size: A4;
    }

    body {
        background-color: white;
        color: black;
        font-family: Arial, sans-serif;
        display: block;
        min-height: auto;
        font-size: 10pt;
    }

    /* Hide non-printable elements */
    .no-print,
    .add-song-section,
    .site-header,
    .site-footer,
    button,
    form,
    .search-results,
    .delete-btn,
    .delete-song-btn,
    .handle {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .card {
        box-shadow: none;
        padding: 0;
        background: transparent;
        margin: 0;
    }

    /* Header Compact */
    .setlist-header {
        text-align: center;
        border-bottom: 2px solid black;
        margin-bottom: 5px;
        padding-bottom: 2px;
    }

    .band-name-header {
        font-size: 20pt !important;
        color: black !important;
        font-weight: 900;
        text-transform: uppercase;
        line-height: 1.1;
    }

    .setlist-header h1 {
        font-size: 14pt;
        margin: 2px 0 0 0;
        font-weight: normal;
    }

    .setlist-header p {
        font-size: 10pt;
        margin: 0;
        display: inline-block;
    }

    /* Song List Compact */
    .song-list {
        display: block;
    }

    .song-item {
        background: white;
        color: black;
        border: none;
        border-bottom: 1px solid #ddd;
        padding: 2px 0;
        margin: 0;
        border-radius: 0;
        display: block;
        /* Block for inline text */
        page-break-inside: avoid;
        line-height: 1.2;
    }

    .song-details {
        display: block;
        /* Block to allow inline children */
        width: 100%;
    }

    .flex {
        display: inline;
    }

    .song-title {
        font-size: 14pt;
        font-weight: bold;
        display: inline;
    }

    .song-meta {
        font-size: 12pt;
        color: #000;
        display: inline;
        margin-left: 5px;
        font-style: italic;
    }

    .song-meta::before {
        content: "- ";
    }

    /* Print Event Badges - Highlighted & New Line */
    .event-badge {
        background-color: transparent !important;
        color: red !important;
        font-size: 12pt;
        font-weight: bold;
        display: block;
        /* Force new line */
        margin-top: 4px;
        margin-bottom: 4px;
        padding: 2px 5px;
        border: 2px solid red;
        /* Strong border */
        border-radius: 4px;
        width: 100%;
        /* Full width availability */
        text-align: center;
        /* Center or Left? "marção em destaque" - Center usually pops more, or full strip. Left is standard. Let's do Full Strip look with border */
        box-shadow: inset 0 0 0 1000px rgba(255, 0, 0, 0.1);
        /* Subtle shading for print if color supported, otherwise just border */
        page-break-inside: avoid;
    }

    /* Print Tuning Box */
    .tuning-info-print {
        display: inline-block !important;
        margin-left: 10px;
        padding: 2px 8px;
        border: 2px solid black;
        color: black !important;
        font-size: 1.2em !important;
        /* Reduced from 1.6em */
        font-weight: 900;
        text-transform: uppercase;
        border-radius: 8px;
        width: auto;
        line-height: 1;
        font-style: normal !important;
        vertical-align: middle;
    }
}

/* Utilities Helper */
.tuning-info-print {
    display: none !important;
}