/* Основные стили для лотереи ProcessWire */

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

body {
    font-family: "Montserrat", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(286deg, #d6fd6c 0%, #2166b0 80%);
    /* background: #2166b0; */
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Навигация */
header nav ul {
    list-style: none;
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header nav li {
    margin-right: 30px;
}

header nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

header nav a:hover,
header nav a.active {
    background: #2166b0;
    color: white;
    transform: translateY(-2px);
}

/* Главная страница */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo h1 {
    font-size: 4em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

.logo h2 {
    font-size: 3em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

.logo p {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.3);
    }

    to {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

/* Форма регистрации */
.registration-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    max-width: 500px;
    margin: 0 auto;
}

.registration-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: "Montserrat", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #c9ee65;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.btn-participate {
    width: 100%;
    padding: 18px;
    background: linear-gradient(136deg, #d3fb6b, #2365af 80%);
    /* background: #252525; */
    color: white;
    /* color: #202020; */
    border: none;
    border-radius: 40px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-participate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Сообщения */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Страница участников */
.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 25px 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.participants-header h1 {
    color: #333;
    font-size: 2.2em;
}

.actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.total-count {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

.btn-export {
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Таблица участников */
.participants-table-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.participants-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.participants-table th,
.participants-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #f8f9fa;
}

.participants-table th {
    background: #252525;
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.participants-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.no-participants {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #2166b0;
    color: white;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    transform: translateY(-2px);
}

/* Рандомайзер */
.randomizer-section {
    text-align: center;
}

.randomizer-section h1 {
    color: white;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.participants-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2em;
    margin-bottom: 40px;
}

.draw-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.winner-display {
    margin-bottom: 40px;
}

.winner-slot {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 3px solid #dee2e6;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.winner-content {
    text-align: center;
    transition: all 0.5s ease;
}

.winner-content .placeholder {
    color: #6c757d;
    font-size: 1.2em;
    font-style: italic;
}

.winner-info {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.winner-item .winner-info {
    text-align: left;
    opacity: 1;
    transform: translateY(0);
}

.winner-info.show {
    opacity: 1;
    transform: translateY(0);
}

.winner-name {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.winner-phone {
    font-size: 1.3em;
    color: #667eea;
    font-weight: 600;
}

.winner-id {
    font-size: 1em;
    color: #6c757d;
    margin-top: 10px;
}

.btn-draw {
    background: linear-gradient(136deg, #d3fb6b, #2365af 80%);
    color: white;
    border: none;
    padding: 20px 40px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(238, 90, 36, 0.3);
}

.btn-draw:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(238, 90, 36, 0.4);
}

.btn-draw:disabled {
    background: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.drawing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.drawing-animation p {
    color: #667eea;
    font-size: 1.2em;
    font-weight: 600;
}

/* Анимация слота */
.winner-slot.spinning {
    background: linear-gradient(45deg, #ff9a9e, #fecfef, #fecfef, #ff9a9e);
    background-size: 400% 400%;
    animation: gradient-shift 0.5s ease infinite;
    border-color: #ff6b6b;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.winner-slot.winner-revealed {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    border-color: #ff6b6b;
    border-width: 4px;
    animation: winner-glow 2s ease-in-out infinite alternate;
}

@keyframes winner-glow {
    from {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    }

    to {
        box-shadow: 0 0 40px rgba(255, 107, 107, 0.6);
    }
}

/* История победителей */
.winners-history {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.winners-history h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 2em;
    text-align: center;
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.winner-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    border-left: 5px solid #c3ed72;
    transition: all 0.3s ease;
}

.winner-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.winner-info strong {
    display: block;
    color: #333;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.winner-info .phone {
    color: #667eea;
    font-weight: 500;
}

.win-time {
    color: #6c757d;
    font-size: 0.9em;
    font-weight: 500;
}

.winners-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-reset {
    background-color: #dee2e6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-reset:hover {
    background-color: #c82333;
}

.btn-reset:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Общие стили для меню */
.menu-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

.menu-toggle {
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
}

.logo__logged {
    margin-top: -32px;
}

.logo__img {
    width: auto;
    height: 80px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
}

/* Скрываем меню по умолчанию */
header {
    position: relative;
}

#mainNav {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1;
}

#mainNav.active {
    display: block;
}

#mainNav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#mainNav li {
    margin: 0;
}

#mainNav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
}

#mainNav a:hover,
#mainNav a.active {
    background: #252525x;
    color: white;
}

.terms {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    font-size: 90%;
}

.terms .link {
    color: #fff;
    text-decoration: none;
}

.text__wrap {
    border-radius: 10px;
    background: #fff;
    padding: 16px;
}

.input__checkbox {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.checkbox {
    cursor: pointer;
    position: relative;
    min-width: 18px;
    width: 18px;
    height: 18px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.checkbox::before {
    content: "";
    display: block;
    background: #555;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.label__checkbox {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    position: relative;
}


.label__checkbox .name {
    font-size: 11px;
    margin-left: 8px;
    cursor: pointer;
}

.label__checkbox .input__checkbox:checked+.checkbox::before {
    opacity: 1;
}

.underline {
    text-decoration: underline;
}

.label__checkbox .link {
    color: #000;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header nav ul {
        flex-direction: column;
        gap: 10px;
    }

    header nav li {
        margin-right: 0;
    }

    .logo h1 {
        font-size: 2.5em;
    }

    .logo h2 {
        font-size: 2em;
    }

    .registration-form {
        padding: 25px;
        margin: 0 10px;
    }

    .participants-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .actions {
        flex-direction: column;
        gap: 15px;
    }

    .participants-table-container {
        padding: 15px;
    }

    .participants-table {
        font-size: 0.9em;
    }

    .participants-table th,
    .participants-table td {
        padding: 10px;
    }

    .randomizer-section h1 {
        font-size: 2em;
    }

    .draw-container {
        padding: 20px;
        margin: 0 10px 30px 10px;
    }

    .winner-slot {
        padding: 20px;
        min-height: 150px;
    }

    .winner-name {
        font-size: 2em;
    }

    .winner-phone {
        font-size: 1.1em;
    }

    .btn-draw {
        padding: 15px 30px;
        font-size: 1.2em;
    }

    .winner-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .winners-history {
        padding: 20px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 2em;
    }

    .logo h2 {
        font-size: 1.5em;
    }

    .registration-form {
        padding: 20px;
    }

    .participants-table {
        font-size: 0.8em;
    }

    .winner-name {
        font-size: 1.25em;
    }

    .winner-phone {
        font-size: 1em;
    }

    .winner-info strong {
        font-size: 1.1em;
    }

    .winner-info .phone {
        font-size: 14px;
    }

    .btn-draw {
        padding: 12px 25px;
        font-size: 1em;
    }

    .logo__img {
        height: 50px;
    }

    .logo p {
        font-size: 1em;
    }

    .registration-form h2 {
        margin-bottom: 20px;
        font-size: 1.5em;
    }

    .container {
        padding-top: 20px;
    }

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

    .form-group label {
        margin-bottom: 6px;
        font-size: 15px;
    }

    .terms {
        margin-bottom: 20px;
    }

    .participants-header h1 {
        font-size: 1.5em;
    }

    .winner-content .placeholder {
        font-size: 1em;
    }

    .participants-info {
        font-size: 1em;
    }

    .winners-header {
        margin-bottom: 20px;
    }

    .winners-history h2 {
        font-size: 1.25em;
        margin-bottom: 0;
    }

    .winner-item {
        align-items: flex-start;
    }

    .winners-history {
        margin-bottom: 32px;
    }
}


/* Анимированные уведомления */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.notification-overlay.show {
    opacity: 1;
}

.notification {
    position: relative;
    padding: 40px 50px;
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    text-align: center;
    font-weight: 700;
    font-size: 1.4em;
    transform: scale(0);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.notification.success {
    background: linear-gradient(135deg, #00f260, #0575e6);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.notification.error {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.notification.show {
    transform: scale(1);
}

/* Анимация фона уведомления */
.notification::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    animation: notification-wave 3s linear infinite;
    z-index: -1;
}

@keyframes notification-wave {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Частицы вокруг уведомления */
.notification-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: particle-float 2s ease-out forwards;
}

@keyframes particle-float {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0);
    }

    10% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(var(--random-x), var(--random-y)) scale(0);
    }
}

/* Пульсирующий эффект для иконки */
.notification-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }

    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    }
}

/* Волновой эффект при появлении */
.notification-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: wave-expand 1.5s ease-out;
}

@keyframes wave-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}