:root {
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --primary: #2d3436;
    --radius: 12px;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background: #dfe6e9;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.glass-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Rules Card */
.rules-card {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rules-card h3 {
    margin-top: 0;
    color: #0d47a1;
    font-size: 1.1rem;
}

.rules-card ul {
    margin: 0;
    padding-left: 20px;
}

.rules-card li {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #1565c0;
}

/* Image Thumbnails */
.img-thumb {
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 6px;
    margin-right: 15px;
    border: 1px solid #ddd;
    cursor: pointer;
    flex-shrink: 0;
}

.img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.img-thumb img:hover {
    transform: scale(1.1);
}

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

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Stats Bar */
.stats-container {
    display: flex;
    align-items: center;
    margin-top: 6px;
}

.stats-bar-wrapper {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #eee;
    width: 180px;
    margin-right: 10px;
}

.stats-bar {
    height: 100%;
}

.stats-bar.r1 {
    background: #fd79a8;
}

.stats-bar.r2 {
    background: #74b9ff;
}

.stats-bar.r3 {
    background: #fab1a0;
}

.stats-bar.rok {
    background: #55efc4;
}

.stats-score {
    font-size: 0.85rem;
    font-weight: bold;
    color: #6c5ce7;
}

/* Combo Table */
.combo-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.combo-table th {
    background: #6c5ce7;
    color: white;
    padding: 10px;
    text-align: center;
}

.combo-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.highlight {
    background: rgba(255, 234, 167, 0.3);
}

.score-breakdown {
    font-size: 0.8rem;
    color: #666;
    margin-left: 5px;
}

/* Matrix */
.matrix-container {
    overflow-x: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-top: 1rem;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
    min-width: 80px;
}

.centered {
    text-align: center !important;
}

/* Grid Colors - Restored */
.grid-cell.r1 {
    background-color: #fd79a8;
    color: white;
    font-weight: bold;
}

.grid-cell.r2 {
    background-color: #74b9ff;
    color: white;
    font-weight: bold;
}

.grid-cell.r3 {
    background-color: #fab1a0;
    color: white;
    font-weight: bold;
}

.grid-cell.rok {
    background-color: #55efc4;
    color: #004d40;
    font-weight: normal;
    font-size: 0.8rem;
}

.grid-cell.empty-cell {
    color: #ccc;
}

.sticky-col {
    position: sticky;
    left: 0;
    background: white;
    z-index: 2;
    border-right: 2px solid #eee;
    text-align: left;
    min-width: 100px;
    font-weight: 600;
}

.name-th {
    z-index: 3;
    background: #f9f9f9;
}

.score-row td {
    background: #f1f2f6;
    font-weight: bold;
    color: #2d3436;
    border-bottom: 2px solid #ccc;
}

/* Form Elements */
.cta-button {
    width: 100%;
    padding: 16px;
    background: #2d3436;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-top: 2rem;
}

select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

select[data-value="1"] {
    background: #fd79a8;
    color: white;
    border-color: #fd79a8;
}

select[data-value="2"] {
    background: #74b9ff;
    color: white;
    border-color: #74b9ff;
}

select[data-value="3"] {
    background: #fab1a0;
    color: white;
    border-color: #fab1a0;
}

select[data-value="ok"] {
    background: #55efc4;
    color: #005544;
    border-color: #55efc4;
}

/* Name Grid */
.name-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.name-btn {
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.name-btn input {
    display: none;
}

.name-btn span {
    display: block;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.name-btn input:checked+span {
    background: #6c5ce7;
    color: white;
    border-color: #6c5ce7;
    font-weight: bold;
}

.name-btn.submitted span {
    border: 1px solid #00b894;
    background: #f0fff4;
    color: #00b894;
    font-weight: 500;
}

.name-btn.submitted input:checked+span {
    background: #00b894;
    color: white;
}

.custom-name-hidden {
    display: none;
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    border: 2px solid #6c5ce7;
    border-radius: 8px;
}

.name-warning {
    margin-top: 10px;
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ffeeba;
}

.loc-desc {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    font-style: italic;
}

.price-tag {
    color: #2d3436;
    font-weight: bold;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.action-cell {
    white-space: nowrap;
}

.del-btn {
    color: red;
    text-decoration: none;
    font-weight: bold;
    padding: 4px;
    margin-left: 5px;
}

.edit-btn {
    text-decoration: none;
    font-size: 1.1rem;
    padding: 4px;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: -10px;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-row {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info {
    flex: 1;
}

.month-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.cal-month {
    width: 300px;
    text-align: center;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 10px;
}

.cal-header {
    font-weight: bold;
    font-size: 0.8rem;
    color: #888;
    padding: 4px;
}

.cal-day {
    padding: 8px 4px;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #f9f9f9;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: default;
}

.cal-day.empty {
    background: transparent;
}

.cal-day.weekend {
    background: #dfe6e9;
    font-weight: 500;
}

.cal-day.holiday {
    color: #d63031;
    border: 1px solid #d63031;
    background: #fff0f0;
    font-weight: bold;
}

/* Calendar Highlights */
.cal-day.highlight-1 {
    background: #fd79a8 !important;
    color: white !important;
    border: 1px solid #e84393;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cal-day.highlight-2 {
    background: #74b9ff !important;
    color: white !important;
    border: 1px solid #0984e3;
    transform: scale(1.05);
}

.cal-day.highlight-3 {
    background: #fab1a0 !important;
    color: white !important;
    border: 1px solid #e17055;
}

.cal-day.highlight-ok {
    background: #55efc4 !important;
    color: #004d40;
}

.cal-legend {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.holiday {
    background: #d63031;
}

.dot.r1 {
    background: #fd79a8;
}

.dot.r2 {
    background: #74b9ff;
}

.dot.r3 {
    background: #fab1a0;
}

/* Collapsible Features */
.details-toggle {
    display: block;
    background: #f1f2f6;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    margin: 5px 0;
    color: #6c5ce7;
    font-weight: 600;
}

.details-toggle:hover {
    background: #e2e2e2;
}

.long-desc-box {
    background: #fdfdfd;
    border-left: 4px solid #6c5ce7;
    padding: 10px;
    font-size: 0.85rem;
    color: #444;
    margin: 8px 0;
    border-radius: 0 4px 4px 0;
    line-height: 1.4;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.02);
}

.closed-notice {
    background: #ffeaa7;
    border: 2px solid #fdcb6e;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    color: #d35400;
    margin-top: 20px;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .glass-card {
        padding: 1.2rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .name-grid {
        gap: 5px;
    }

    .name-btn {
        flex: 1 1 45%;
        /* 2 per row */
    }

    .item-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .item-action {
        width: 100%;
    }

    .item-action select {
        width: 100%;
        padding: 12px;
    }

    .stats-bar-wrapper {
        width: 140px;
    }

    .month-container {
        padding: 10px;
    }

    .cal-month {
        width: 100%;
    }

    .cta-button {
        font-size: 1rem;
        padding: 14px;
    }

    .button-group {
        flex-direction: column;
    }
}