* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1512 0%, #2d2417 50%, #3d3428 100%);
    background-image: url('assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 20, 18, 0.4);
    pointer-events: none;
    z-index: -1;
}

/* Animated Stars Background */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}


@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Container */
.container {
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    animation: slideDown 0.6s ease-out;
}

.header h1 {
    font-size: 2.5em;
    color: #D4A574;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

.tagline {
    color: #E8D4B8;
    font-size: 1.1em;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Wrapper */
.card-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Market Info */
.market-info {
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    padding: 25px;
    color: #F5F1E8;
}

.market-banner {
    text-align: center;
    margin-bottom: 20px;
}

.market-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.market-banner h2 {
    font-size: 2.2em;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    color: #FFF8F0;
}

.market-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.detail-icon {
    font-size: 1.5em;
}

/* Form Container */
.form-container {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: #C19A6B;
    box-shadow: 0 0 15px rgba(193, 154, 107, 0.3);
}

.form-group select:focus {
    outline: none;
    border-color: #C19A6B;
    box-shadow: 0 0 15px rgba(193, 154, 107, 0.3);
}

.form-group input::placeholder {
    color: #999;
}

.form-group select {
    background-color: white;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Form Row for Digits */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.separator {
    font-size: 1.8em;
    font-weight: 800;
    color: #f5576c;
    text-align: center;
    margin-bottom: 5px;
}

/* Digit Input Wrapper */
.digit-input-wrapper {
    position: relative;
}

.digit-input-wrapper input {
    font-size: 1.8em;
    text-align: center;
    font-weight: 700;
    letter-spacing: 10px;
    width: 100%;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.digit-input-wrapper input:focus {
    border-color: #C19A6B;
    box-shadow: 0 0 15px rgba(193, 154, 107, 0.3);
}

.digit-display {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    font-weight: 800;
    color: #C19A6B;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.digit-input-wrapper input:focus ~ .digit-display {
    opacity: 1;
}

/* Amount Wrapper */
.amount-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-wrapper .currency {
    position: absolute;
    left: 15px;
    font-weight: 700;
    color: #C19A6B;
    font-size: 1.1em;
}

.amount-wrapper input {
    padding-left: 45px;
}

/* Quick Amount Buttons */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.quick-btn {
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #333;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.quick-btn:hover {
    background: #C19A6B;
    color: #FFF8F0;
    border-color: #C19A6B;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(193, 154, 107, 0.3);
}

.quick-btn:active {
    transform: translateY(-1px);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    color: #FFF8F0;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(139, 111, 71, 0.4);
    margin-bottom: 20px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(193, 154, 107, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Info Text */
.info-text {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    line-height: 1.8;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

/* Footer */
.footer {
    text-align: center;
    color: #E8D4B8;
    margin-top: 30px;
    font-size: 0.9em;
    line-height: 1.8;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Peraturan Section */
.rules-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-top: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
}

.rules-section h3 {
    color: #C19A6B;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.rules-content {
    display: grid;
    gap: 15px;
}

.rule-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(193, 154, 107, 0.1) 0%, rgba(139, 111, 71, 0.05) 100%);
    border-left: 4px solid #C19A6B;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.rule-item:hover {
    background: linear-gradient(135deg, rgba(193, 154, 107, 0.15) 0%, rgba(139, 111, 71, 0.1) 100%);
    transform: translateX(5px);
}

.rule-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #C19A6B;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.rule-item p {
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

.rule-item strong {
    color: #8B6F47;
}

/* Hadiah Section */
.prize-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-top: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
}

.prize-section h3 {
    color: #C19A6B;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
}

.prize-table {
    display: grid;
    gap: 2px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.prize-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    padding: 0;
    gap: 0;
}

.prize-header .prize-col {
    color: white;
    font-weight: 700;
    padding: 15px;
    text-align: center;
    border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.prize-header .prize-col:last-child {
    border-right: none;
}

.prize-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    gap: 0;
    transition: all 0.3s ease;
}

.prize-row:hover {
    background: #F5F1E8;
}

.prize-col {
    padding: 15px;
    text-align: center;
    font-size: 0.95em;
    color: #333;
    font-weight: 600;
    border-right: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prize-col:last-child {
    border-right: none;
}

.prize-amount {
    color: #C19A6B;
    font-weight: 700;
    font-size: 1.05em;
}

.prize-row:hover .prize-amount {
    color: #8B6F47;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    color: #FFF8F0;
    padding: 25px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 800;
}

.modal-body {
    padding: 25px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.05em;
    font-weight: 600;
}

.result-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.result-info p {
    margin: 10px 0;
    color: #555;
    font-size: 0.95em;
    word-break: break-all;
}

.result-info strong {
    color: #C19A6B;
}

.modal-close {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8B6F47 0%, #6B5635 100%);
    color: #FFF8F0;
    border: none;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    opacity: 0.9;
}

/* Telegram Claim Button in Success Modal */
.modal-claim {
    display: inline-block;
    width: 100%;
    padding: 14px;
    margin-bottom: 10px;
    text-align: center;
    background: linear-gradient(135deg, #2EA8E5 0%, #0B79C1 100%);
    color: #FFF8F0;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(14, 99, 150, 0.25);
    transition: all 0.25s ease;
}

.modal-claim:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(14, 99, 150, 0.35);
    opacity: 0.98;
}

/* Confirmation Modal Styles */
.confirm-modal-content {
    max-width: 420px !important;
}

.confirm-header {
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    color: #FFF8F0;
    padding: 30px 25px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.confirm-header h3 {
    font-size: 1.6em;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.confirm-header p {
    font-size: 0.95em;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}

.confirm-body {
    padding: 30px 25px;
    background: white;
}

.confirm-details {
    background: linear-gradient(135deg, rgba(193, 154, 107, 0.08) 0%, rgba(139, 111, 71, 0.04) 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid rgba(193, 154, 107, 0.2);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(193, 154, 107, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #8B6F47;
    font-size: 0.95em;
}

.detail-value {
    font-weight: 700;
    color: #333;
    font-size: 1em;
    text-align: right;
}

.digits-highlight {
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    color: #FFF8F0 !important;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 1.2em;
    letter-spacing: 2px;
}

.confirm-warning {
    background: rgba(193, 154, 107, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #C19A6B;
}

.confirm-warning p {
    color: #555;
    font-size: 0.9em;
    margin: 8px 0;
    line-height: 1.5;
}

.confirm-warning p:first-child {
    margin-top: 0;
}

.confirm-warning p:last-child {
    margin-bottom: 0;
}

.confirm-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0;
    border-radius: 0 0 20px 20px;
    background: #F5F1E8;
    border-top: 2px solid #e0e0e0;
}

.btn-cancel,
.btn-confirm {
    padding: 16px 20px;
    border: none;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel {
    background: linear-gradient(135deg, #d0d0d0 0%, #b0b0b0 100%);
    color: #333;
    border-radius: 0 0 0 20px;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #b0b0b0 0%, #909090 100%);
    transform: translateY(-2px);
}

.btn-cancel:active {
    transform: translateY(0);
}

.btn-confirm {
    background: linear-gradient(135deg, #C19A6B 0%, #8B6F47 100%);
    color: #FFF8F0;
    border-radius: 0 0 20px 0;
    box-shadow: 0 5px 15px rgba(193, 154, 107, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #8B6F47 0%, #6B5635 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(193, 154, 107, 0.4);
}

.btn-confirm:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .confirm-modal-content {
        max-width: 90% !important;
        width: 90% !important;
    }

    .confirm-header h3 {
        font-size: 1.4em;
    }

    .confirm-header p {
        font-size: 0.85em;
    }

    .confirm-body {
        padding: 20px 15px;
    }

    .confirm-details {
        padding: 15px;
    }

    .detail-row {
        padding: 10px 0;
        font-size: 0.9em;
    }

    .detail-label {
        font-size: 0.85em;
    }

    .detail-value {
        font-size: 0.95em;
    }

    .digits-highlight {
        font-size: 1em;
        padding: 4px 12px;
    }

    .confirm-footer {
        gap: 0;
    }

    .btn-cancel,
    .btn-confirm {
        padding: 14px 12px;
        font-size: 0.85em;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .header h1 {
        font-size: 1.8em;
    }

    .tagline {
        font-size: 0.95em;
    }

    .market-banner h2 {
        font-size: 1.8em;
    }

    .market-details {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px;
    }

    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .separator {
        display: none;
    }

    .submit-btn {
        font-size: 1em;
    }

    .footer {
        font-size: 0.85em;
    }

    .rules-section {
        padding: 20px;
    }

    .rules-section h3 {
        font-size: 1.2em;
    }

    .rule-item {
        padding: 12px;
        gap: 12px;
    }

    .rule-number {
        width: 28px;
        height: 28px;
        font-size: 0.9em;
    }

    .rule-item p {
        font-size: 0.9em;
    }

    .prize-section {
        padding: 20px;
    }

    .prize-section h3 {
        font-size: 1.2em;
    }

    .prize-header .prize-col,
    .prize-col {
        padding: 12px 8px;
        font-size: 0.85em;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}
