/* Container and General Layout */
.survey-wrapper {
    padding: 40px 20px;
    max-width: 2000px;
    margin: 0 auto;
    color: #f0f0f0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.survey-create, .survey-view {
    background: rgba(25, 25, 30, 0.95);
    padding: 35px;
    border-radius: 12px;
    border: 1px solid #3a3a45;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.survey-view.expired .new-vote-row,
.survey-view.expired .vote-footer {
    display: none;
}

h2 {
    margin-top: 0;
    color: #fff;
    border-bottom: 2px solid #ff4444;
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
}

/* Forms and Inputs */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #bbb;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px;
    background: #1a1a20;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #ff4444;
    outline: none;
}

/* Buttons */
.btn-main {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

.btn-sec {
    background: #333;
    color: #eee;
    border: 1px solid #555;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-sec:hover {
    background: #444;
}

.btn-finish {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 20px;
}

/* Xoyondo-Style Voting Table */
.xoyondo-table-wrapper {
    overflow-x: auto;
    margin-top: 30px;
    background: #1e1e24;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 1px;
    -webkit-overflow-scrolling: touch;
}

.xoyondo-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    table-layout: fixed;
}

/* Participant Column (Sticky) */
.name-col, .past-voter-name {
    padding: 10px 15px;
    min-width: 130px;
    width: 140px;
    text-align: left;
    background: #25252d;
    border-bottom: 1px solid #111;
    position: sticky;
    left: 0;
    z-index: 5;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.name-col {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
}

.past-voter-name {
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Date Headers */
.date-header {
    background: #2e2e38;
    padding: 8px 4px;
    min-width: 35px;
    width: 40px;
    text-align: center;
    border-left: 1px solid #111;
    border-bottom: 1px solid #111;
}

.hidden_input{
    display: none;
}

.date-header .mon { font-size: 0.7em; color: #aaa; text-transform: uppercase; }
.date-header .day { font-size: 1.2em; font-weight: bold; margin: 2px 0; color: #fff; }
.date-header .wk { font-size: 0.7em; color: #ff4444; font-weight: 600; }

/* Voting Circles & Icons */
.res-circle, .circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    color: white;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.res-circle.yes::after, .vote-opt.yes .circle::after { content: '✓'; }
.res-circle.no::after, .vote-opt.no .circle::after { content: '✕'; }
.res-circle.maybe::after, .vote-opt.maybe .circle::after { content: '?'; }

/* Existing Results Cells */
.vote-result-cell {
    text-align: center;
    padding: 10px;
    background: #1e1e24;
    border-left: 1px solid #111;
    border-bottom: 1px solid #111;
}

.vote-result-cell_0{
    background: #952F34;
}
.vote-result-cell_1{
    background: #288D55;
}
.vote-result-cell_2{
    background: #C1801B;
}


.res-circle.yes { background: #2ecc71; border: 2px solid #27ae60; }
.res-circle.no { background: #e74c3c; border: 2px solid #c0392b; }
.res-circle.maybe { background: #f1c40f; border: 2px solid #f39c12; }

/* Interaction Row (New Vote) */
.new-vote-row td {
    background: #2a2a35;
    padding: 15px 10px;
}

.new-vote-row.editing {
    background: rgba(255, 171, 0, 0.1) !important;
}

.voter-input {
    width: 100%;
    padding: 8px;
    background: #111;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
}

.vote-cell {
    text-align: center;
    border-left: 1px solid #111;
}

.vote-opt {
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
}

.vote-opt input { display: none; }

.vote-opt .circle {
    background: #333;
    opacity: 0.4;
    margin-top: 2px;
}

.vote-opt.yes .circle { border: 1px solid #2ecc71; color: #2ecc71; }
.vote-opt.no .circle { border: 1px solid #e74c3c; color: #e74c3c; }
.vote-opt.maybe .circle { border: 1px solid #f1c40f; color: #f1c40f; }

.vote-opt:hover .circle {
    opacity: 1;
    transform: scale(1.1);
}

.vote-opt input:checked + .circle {
    opacity: 1;
    color: white;
    box-shadow: 0 0 8px currentColor;
}

.vote-opt.yes input:checked + .circle { background: #2ecc71; border-color: #2ecc71; }
.vote-opt.no input:checked + .circle { background: #e74c3c; border-color: #e74c3c; }
.vote-opt.maybe input:checked + .circle { background: #f1c40f; border-color: #f1c40f; }

/* Action Columns & Totals */
.action-col {
    width: 80px;
    text-align: center;
    padding: 10px;
}

.btn-edit-small {
    color: #ff4444;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid #ff4444;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-edit-small:hover {
    background: #ff4444;
    color: #fff;
}

.btn-del-small {
    color: #ff4444;
    text-decoration: none;
    font-size: 1.1em;
    margin-left: 10px;
}

.total-row td {
    background: #111;
    font-weight: bold;
    color: #aaa;
    text-align: center;
    border-top: 2px solid #333;
    padding: 10px;
}

.total-cell.winner {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.1) !important;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

/* Calendar Setup Mode */
.calendar-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.month-block {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
    flex: 1;
    min-width: 300px;
}

.day-cell {
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.2s;
    user-select: none;
}

.day-cell:hover { background: #444; }

.day-cell.selected {
    background: #ff4444;
    color: white;
    font-weight: bold;
}

.disabled-day {
    opacity: 0.9;
    cursor: not-allowed !important;
    background: transparent !important;
    color: #555 !important;
}

/* Footer & Notices */
.vote-footer {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.expired-notice {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

/* ============================================================
   THEME 1: ART (Rainbow, Glassmorphism & Gallery Style)
   ============================================================ */

@keyframes rainbowFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-1 {
    background: linear-gradient(
            124deg,
            #ff2400, #e81d1d, #e8b71d, #e3e81d,
            #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3
    );
    background-size: 1800% 1800%;
    animation: rainbowFlow 60s ease infinite;
    border: 8px solid #fff;
    outline: 4px solid rgba(0, 0, 0, 0.1);
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.4);
    transform: rotate(-0.5deg); /* Slight tilt for artistic look */
}

.theme-1 h1 {
    font-family: 'Comic Sans MS', 'Cursive', sans-serif;
    color: #fff;
    text-transform: uppercase;
    font-size: 3em;
    text-shadow: 3px 3px 0px #ff00ea, 6px 6px 0px #00d2ff;
    margin-bottom: 20px;
}

/* Glassmorphism Description */
.theme-1 .survey-desc {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 15px;
    color: #fff !important;
    font-weight: 600;
    line-height: 1.6;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    margin: 20px 0;
    display: inline-block;
}

.theme-1 .xoyondo-table-wrapper {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(15px);
    border: 3px solid #fff !important;
    border-radius: 20px;
    padding: 10px;
}

.theme-1 .xoyondo-table,
.theme-1 .xoyondo-table th,
.theme-1 .xoyondo-table td {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.theme-1 .name-col, .theme-1 .past-voter-name {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-weight: 800;
}

.theme-1 .btn-main {
    background: #fff;
    color: #ff00ea;
    border-radius: 0px; /* Sharp art-gallery style */
    font-weight: 900;
    border: 4px solid #ff00ea;
    box-shadow: 5px 5px 0px #00d2ff;
    transition: 0.2s;
}

.theme-1 .btn-main:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0px #00d2ff;
}

/* Icons */
.theme-1 .res-circle.yes { background: #2ecc71; border: 3px solid #fff; box-shadow: 0 0 15px #2ecc71; }
.theme-1 .res-circle.no { background: #e74c3c; border: 3px solid #fff; box-shadow: 0 0 15px #e74c3c; }
.theme-1 .res-circle.maybe { background: #f1c40f; border: 3px solid #fff; box-shadow: 0 0 15px #f1c40f; }

/* ============================================================
   THEME 2: D&D (Fantasy, Parchment & Fire)
   ============================================================ */

@keyframes fireFlicker {
    0% { opacity: 0.5; transform: scale(1) translateY(0); }
    50% { opacity: 0.8; transform: scale(1.1) translateY(-10px); }
    100% { opacity: 0.5; transform: scale(1) translateY(0); }
}

.theme-2 {
    position: relative;
    background-color: #1a0f0a;
    background-image: url("https://www.transparenttextures.com/patterns/dark-leather.png");
    border: 3px double #d4af37;
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
    overflow: hidden;
    z-index: 1;

    color: #d4af37;

}

.theme-2 .survey-desc {
    color: #d4af37 !important;
    font-style: italic;
    border-left: 3px solid #8b4513;
    padding-left: 15px;
}


.theme-2::before {
    content: "";
    position: absolute;
    bottom: -100px; left: 0; right: 0; height: 300px;
    background: radial-gradient(circle at bottom, rgba(255, 68, 0, 0.4) 0%, rgba(139, 69, 19, 0.1) 60%, transparent 80%);
    animation: fireFlicker 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.theme-2 .xoyondo-table,
.theme-2 .xoyondo-table th,
.theme-2 .xoyondo-table td,
.theme-2 .name-col,
.theme-2 .past-voter-name {
    border-color: #5d4037 !important;
}

.theme-2 h1 {
    font-family: Garamond, serif;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
    border-bottom: 1px solid #d4af37;
    text-shadow: 0 0 15px rgba(255, 68, 0, 0.6);



}

.theme-2 .xoyondo-table-wrapper {
    border: 2px solid #5d4037;
    background: rgba(62, 39, 35, 0.85);
}

.theme-2 .name-col, .theme-2 .past-voter-name {
    background: #3e2723;
    color: #d4af37;
}

/* Retained Square Boxes for D&D Theme */
.theme-2 .res-circle {
    border-radius: 2px !important;
}

.theme-2 .res-circle.yes {
    background: #388e3c;
    border: 2px solid #d4af37;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.theme-2 .res-circle.no {
    background: #8b0000;
    border: 2px solid #d4af37;
}

.theme-2 .res-circle.maybe {
    background: #C1801B;
    border: 2px solid #d4af37;
}

.theme-2 .btn-main {
    background: #8b4513;
    border: 2px solid #d4af37;
    color: #d4af37;
    box-shadow: 3px 3px 0px #000;
}

.theme-2 .total-cell.winner {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #fff;
    border: 1px goldenrod dashed !important;
}