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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1d29;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: #252936;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.left-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
    text-align: left;
    font-weight: 600;
}

.mode-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #2d3142;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #9ca3af;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mode-indicator strong {
    color: #fff;
    font-size: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    font-weight: 500;
}

.bet-amount-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="number"] {
    background: #2d3142;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 60px 12px 16px;
    color: #fff;
    font-size: 16px;
    width: 100%;
    transition: all 0.2s ease;
    font-weight: 500;
}

input[type="number"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: #35394a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.currency-label {
    position: absolute;
    right: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
}

input[type="number"]::placeholder {
    color: #6b7280;
}

.currency-select {
    background: #2d3142;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #fff;
    font-size: 16px;
    width: 100%;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.currency-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: #35394a;
}

.currency-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background-color: #35394a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.currency-select option {
    background: #2d3142;
    color: #fff;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 32px;
    background: #2d3142;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-switch.active {
    background: #3d4254;
    border-color: rgba(255, 255, 255, 0.15);
}

.toggle-switch.active.lose {
    background: #4a3d42;
    border-color: rgba(255, 255, 255, 0.15);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.toggle-switch.active + .toggle-label {
    color: #fff;
}

.bet-button {
    background: #3d4254;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
}

.bet-button:hover {
    background: #454a5d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.bet-button:active {
    transform: translateY(0);
    background: #35394a;
}

.bet-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #2d3142;
}

.right-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: #2d3142;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.response-area {
    background: #2d3142;
    border-radius: 8px;
    padding: 16px;
    min-height: 150px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow-y: auto;
    max-height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.response-area.success {
    border-left: 3px solid #4a5568;
    background: rgba(255, 255, 255, 0.03);
}

.response-area.error {
    border-left: 3px solid #5a3d42;
    background: rgba(255, 255, 255, 0.03);
}

.response-area:empty::before {
    content: 'Response will appear here...';
    color: #666;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
        min-height: auto;
    }

    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        border-radius: 8px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .left-section {
        gap: 20px;
    }

    .form-group {
        gap: 6px;
    }

    label {
        font-size: 11px;
    }

    input[type="number"] {
        padding: 10px 50px 10px 12px;
        font-size: 14px;
    }

    .currency-select {
        padding: 10px 35px 10px 12px;
        font-size: 14px;
    }

    .currency-label {
        right: 12px;
        font-size: 14px;
    }

    .toggle-switch {
        width: 48px;
        height: 28px;
    }

    .toggle-slider {
        width: 22px;
        height: 22px;
        top: 3px;
        left: 3px;
    }

    .toggle-switch.active .toggle-slider {
        transform: translateX(20px);
    }

    .toggle-label {
        font-size: 13px;
    }

    .bet-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .image-placeholder {
        height: 200px;
    }

    .response-area {
        min-height: 120px;
        max-height: 250px;
        padding: 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .container {
        padding: 15px;
        gap: 15px;
    }

    h1 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .left-section {
        gap: 15px;
    }

    input[type="number"] {
        padding: 8px 45px 8px 10px;
        font-size: 13px;
    }

    .currency-select {
        padding: 8px 30px 8px 10px;
        font-size: 13px;
    }

    .currency-label {
        right: 10px;
        font-size: 13px;
    }

    .image-placeholder {
        height: 180px;
    }

    .response-area {
        min-height: 100px;
        max-height: 200px;
        padding: 10px;
        font-size: 10px;
    }
}
