﻿body {
    background: url('img/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: #222;
    letter-spacing: 2px;
}

.logo-orange {
    color: #f7931a;
}

.logo-discount {
    background: #f7931a;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 4px;
    padding: 2px 12px;
    margin-left: 8px;
    letter-spacing: 1px;
}

.divider {
    width: 220px;
    height: 4px;
    background: #f7931a;
    margin: 8px auto 0 auto;
    border-radius: 2px;
}

.main-title {
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.main-box-with-rules {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    gap: 32px;
    padding-top: 80px
}

.main-box {
    margin-top: 0;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    box-shadow: none;
    padding: 0;
}

.main-subtitle {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 18px;
    font-weight: 500;
}

.input-group {
    width: 100%;
    max-width: 480px;
}

.input-box {
    width: 100%;
    border: 2px dashed #f7931a;
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .input-box input,
    .input-box select {
        width: 100%;
        padding: 12px 10px;
        border: none;
        outline: none;
        font-size: 1.2rem;
        background: #f7931a;
        color: #222;
        border-radius: 6px;
        box-sizing: border-box;
        display: block;
    }

.button-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
    margin-top: 18px;
}

.main-btn {
    flex: 1;
    background: #f7931a;
    color: #222;
    border: none;
    border-radius: 8px;
    padding: 18px 0;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

    .main-btn i {
        margin-left: 12px;
        font-size: 1.3rem;
    }

    .main-btn:hover {
        background: #e67c13;
    }

.rules-panel {
    min-width: 280px;
    max-width: 420px;
    background: #fff7ed;
    border: 2px solid #f7931a;
    border-radius: 12px;
    padding: 24px 18px 18px 18px;
    box-shadow: 0 2px 12px 0 rgba(247,147,26,0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: fit-content;
    max-height: 200px;
    overflow-y: auto;
}

.rules-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f7931a;
    margin-bottom: 10px;
}

.rules-content {
    color: #222;
    font-size: 1rem;
    line-height: 1.5;
}

.icon-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
}

.icon-btn {
    background: #fff;
    border: 2px solid #222;
    border-radius: 10px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #222;
    cursor: pointer;
    transition: border 0.2s, color 0.2s;
}

    .icon-btn:hover {
        border: 2px solid #f7931a;
        color: #f7931a;
    }

@media (max-width: 900px) {
    .main-box-with-rules {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top:0px
    }

    .rules-panel {
        margin-top: 24px;
        width: 95vw;
        max-width: 480px;
        min-width: unset;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 1.1rem;
    }

    .main-box {
        max-width: 100vw;
        width: calc(100vw - 32px);
        margin-left: 16px;
        margin-right: 16px;
        box-sizing: border-box;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .logo-discount {
        font-size: 0.9rem;
        padding: 2px 8px;
    }

    .divider {
        width: 120px;
    }

    .input-box input {
        font-size: 1rem;
        padding: 10px 8px;
    }

    .main-btn, .rules-btn {
        font-size: 1rem;
        padding: 12px 0;
    }

    .icon-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }

    .rules-panel {
        width: calc(100vw - 32px);
        max-width: 100vw;
        margin-left: 16px;
        margin-right: 16px;
        box-sizing: border-box;
        padding: 16px 8px 12px 8px;
    }
}

#userIdBox {
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    transition: all 0.2s;
}

    #userIdBox.visible {
        visibility: visible;
        height: auto;
        margin-top: 14px;
        padding: 8px 10px;
    }

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.35);
    align-items: center;
    justify-content: center;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 90vw;
    width: 350px;
    padding: 32px 20px 24px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center;
    position: relative;
    animation: popin 0.25s cubic-bezier(.4,2,.6,1) 1;
}

@keyframes popin {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}

    .modal-close:hover {
        color: #dc3545;
    }

#modalIcon {
    font-size: 3rem;
    margin-bottom: 12px;
}

    #modalIcon.success {
        color: #28a745;
    }

    #modalIcon.error {
        color: #dc3545;
    }
    #modalIcon.info {
        color: #17a2b8;
    }
#modalMessage {
    font-size: 1.15rem;
    color: #222;
    margin-bottom: 8px;
    word-break: break-word;
}

@media (max-width: 600px) {
    .modal-content {
        width: 95vw;
        max-width: 95vw;
        padding: 20px 6vw 16px 6vw;
    }

    #modalMessage {
        font-size: 1rem;
    }
}
