/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #f8fafc;
}

/* Glassmorphism Card */
.simulator-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Header */
.simulator-header {
    text-align: center;
    margin-bottom: 28px;
}

.simulator-header h1 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(to right, #818cf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.simulator-header .subtitle {
    font-size: 13px;
    color: #94a3b8;
}

/* Sections */
section {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* Input Fields */
input[type="number"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 18px;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    border-color: #818cf8;
    box-shadow: 0 0 12px rgba(129, 140, 248, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

/* Hide Spin Buttons */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Rate Section */
.rate-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.rate-input-container input {
    padding-right: 45px;
    font-size: 16px;
    text-align: right;
}

.rate-input-container .unit {
    position: absolute;
    right: 16px;
    font-size: 14px;
    color: #64748b;
    pointer-events: none;
}

.rate-presets {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.preset-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.preset-btn.active {
    background: rgba(129, 140, 248, 0.2);
    border-color: #818cf8;
    color: #818cf8;
}

/* Converter Section */
.input-group {
    position: relative;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.currency-symbol {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
}

.swap-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
}

.swap-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.swap-icon:hover {
    background: rgba(129, 140, 248, 0.2);
    color: #818cf8;
    border-color: #818cf8;
    transform: scale(1.1);
}

/* Presets Section */
.presets-section h2 {
    font-size: 13px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 12px;
}

.preset-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.preset-item-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preset-item-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.preset-item-btn .emoji {
    font-size: 18px;
}

.preset-item-btn .name {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preset-item-btn .price {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

/* Footer */
.simulator-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.6;
}

.simulator-footer a {
    color: #818cf8;
    text-decoration: none;
    transition: color 0.2s;
}

.simulator-footer a:hover {
    color: #f472b6;
    text-decoration: underline;
}

.simulator-footer .credit {
    margin-top: 8px;
    font-weight: 500;
}

/* Responsive adjustments for iframe */
@media (max-width: 400px) {
    .simulator-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .preset-items {
        grid-template-columns: 1fr;
    }
}
