* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: radial-gradient(circle at top, #1f162b, #0d0914);
    color: #f3eef8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-wrapper {
    width: 100%;
    max-width: 560px;
}

.card {
    background: #1b1526;
    border: 1px solid #352949;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.card-wide {
    max-width: 820px;
    margin: 0 auto;
}

.app-wrapper:has(.card-wide:not(.hidden)) {
    max-width: 820px;
}

.hidden {
    display: none !important;
}

.title {
    font-size: 1.65rem;
    margin-bottom: 8px;
    text-align: center;
    color: #ff7b29;
}

.subtitle {
    text-align: center;
    color: #a99bb9;
    margin-bottom: 22px;
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #cfc3de;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #44355b;
    background: #120d1a;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
}

.form-group input:focus {
    border-color: #ff7b29;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
}

.full-width {
    width: 100%;
}

.btn-primary {
    background: #ff6a00;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #ff852e;
}

.btn-accent {
    background: #7b2cbf;
    color: #fff;
}

.btn-accent:hover:not(:disabled) {
    background: #9d4edd;
}

.btn-secondary {
    background: #2d233e;
    color: #e0d6ed;
}

.btn-secondary:hover:not(:disabled) {
    background: #3d3054;
}

.btn-success {
    background: #2b9348;
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #40916c;
}

.btn-warning {
    background: #e09f3e;
    color: #1a1205;
}

.btn-warning:hover:not(:disabled) {
    background: #f0b152;
}

.btn-danger {
    background: #d90429;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #ef233c;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn-link {
    background: none;
    border: none;
    color: #b79ced;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.btn-link:hover {
    text-decoration: underline;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.user-header {
    text-align: center;
    margin-bottom: 10px;
}

.badge-user {
    background: #2b213a;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #ff9e5e;
    border: 1px solid #473660;
}

/* Drag & Drop */
.drop-zone {
    border: 2px dashed #5c477a;
    border-radius: 14px;
    padding: 36px 20px;
    text-align: center;
    background: #140f1d;
    transition: all 0.25s;
    margin-top: 12px;
}

.drop-zone.dragover {
    border-color: #ff6a00;
    background: rgba(255, 106, 0, 0.08);
}

.drop-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.or-divider {
    display: block;
    margin: 12px 0;
    color: #88789c;
    font-size: 0.85rem;
}

/* Фото превью */
.photo-preview-box {
    text-align: center;
    margin: 16px 0;
}

.photo-preview-box img {
    max-width: 100%;
    max-height: 360px;
    border-radius: 12px;
    border: 2px solid #44355b;
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
}

#btn-delete-photo {
    margin-top: 4px;
}

/* Номинации с тултипами при наведении */
.hint {
    font-size: 0.8rem;
    font-weight: normal;
    color: #9b8cb0;
}

.nominations-radio-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 18px;
}

.nomination-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    background: #130e1c;
    border: 1px solid #3c2e51;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.nomination-option:hover {
    border-color: #ff7b29;
    background: #1d152b;
}

.nom-title {
    font-weight: 600;
}

/* Всплывающее описание при наведении курсора */
.nom-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 20px;
    background: #ff6a00;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 20;
}

.nomination-option:hover .nom-tooltip {
    visibility: visible;
    opacity: 1;
}

.confirmed-box {
    background: rgba(43, 147, 72, 0.12);
    border: 1px solid #2b9348;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.confirmed-badge {
    color: #55d67b;
    font-weight: 700;
    margin-bottom: 8px;
}

.bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #322644;
}

/* Экран выбора номинаций для голосования */
.vote-nominations-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.btn-nom-select {
    width: 100%;
    text-align: left;
    padding: 16px;
    border-radius: 12px;
    background: #151020;
    border: 1px solid #483860;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nom-select:hover:not(:disabled) {
    border-color: #ff7b29;
    transform: translateY(-2px);
}

.btn-nom-select:disabled {
    opacity: 0.5;
    background: #1b1722;
    border-color: #2b9348;
    cursor: not-allowed;
}

.nom-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff8c42;
    margin-bottom: 4px;
}

.nom-desc {
    font-size: 0.9rem;
    color: #bdb0ce;
    margin-bottom: 8px;
}

.nom-status {
    font-size: 0.82rem;
    color: #8ce99a;
    font-weight: 600;
}

/* Карточки участников и кнопка с сердечком */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.participant-card {
    background: #130e1c;
    border: 1px solid #382b4c;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.participant-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.participant-info {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.participant-author {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.participant-costume {
    font-size: 0.85rem;
    color: #ff9e5e;
    margin-top: 3px;
}

/* Кнопка сердечко: белый фон и красный контур по умолчанию, закрашивается в красный при клике */
.heart-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e63946;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.2s ease;
}

.heart-btn:hover {
    transform: scale(1.08);
}

.heart-btn svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    stroke: #e63946;
    stroke-width: 2.2;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.heart-btn.liked {
    background: #e63946;
}

.heart-btn.liked svg {
    fill: #ffffff;
    stroke: #ffffff;
}

/* Админка — Блок управления голосованием */
.voting-control-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: #130e1c;
    border: 1px solid #483860;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 16px;
}

.voting-status-label {
    font-size: 0.82rem;
    color: #b1a3c4;
    margin-bottom: 4px;
}

.status-badge {
    font-weight: 700;
    font-size: 1rem;
}

.status-on {
    color: #55d67b;
}

.status-off {
    color: #ff4d6d;
}

/* Админка — Статистика */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.stat-box {
    background: #130e1c;
    border: 1px solid #382b4c;
    padding: 14px;
    border-radius: 10px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #b1a3c4;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff7b29;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-panel-box {
    background: #130e1c;
    border: 1px solid #382b4c;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.admin-list {
    list-style: inside decimal;
    margin-top: 12px;
    line-height: 1.7;
    color: #e0d6ed;
}

.admin-nom-Origin {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
}

.results-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #2b213a;
}

.results-row:last-child {
    border-bottom: none;
}

.results-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-user img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

.votes-badge {
    background: #ff6a00;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
}

/* Опасная зона сброса в админке */
.admin-danger-zone {
    margin-top: 24px;
    padding: 18px;
    border-radius: 12px;
    background: rgba(217, 4, 41, 0.08);
    border: 1px solid rgba(217, 4, 41, 0.4);
}

.danger-title {
    color: #ff4d6d;
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.danger-desc {
    color: #c9b8d9;
    font-size: 0.85rem;
    margin-bottom: 14px;
    line-height: 1.4;
}

.danger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Пуш-уведомления (Тосты) */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #231b30;
    border-left: 5px solid #2b9348;
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    font-weight: 500;
    animation: slideIn 0.25s ease-out;
}

.toast.error {
    border-left-color: #d90429;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
