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

html, body {
    width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-black: #0a0a0a;
    --secondary-black: #1a1a1a;
    --tertiary-black: #2a2a2a;
    --primary-gold: #d4af37;
    --secondary-gold: #b8941f;
    --accent-gold: #f4e4bc;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #999999;
    --surface-dark: #1e1e1e;
    --surface-darker: #121212;
    --border-subtle: rgba(212, 175, 55, 0.2);
    --shadow-luxury: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.4);
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-black);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}

header {
    background: var(--gradient-dark);
    padding: 32px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.1) 50%, transparent 70%);
    pointer-events: none;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

main {
    padding: 32px 0;
}

.location-section {
    background: var(--surface-dark);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-luxury);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.location-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-gold);
    opacity: 0.6;
}

.current-location, .home-location {
    margin-bottom: 24px;
}

.current-location:last-child, .home-location:last-child {
    margin-bottom: 0;
}

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

.current-location h2, .home-location h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.edit-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--primary-gold);
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.edit-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary-gold);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.action-btn {
    background: var(--gradient-gold);
    color: var(--primary-black);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 50px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #f4e4bc 0%, #d4af37 100%);
}

.action-btn:active {
    transform: translateY(0);
}

#current-location-display, #home-address-display {
    background: var(--surface-darker);
    padding: 16px;
    border-radius: 12px;
    min-height: 24px;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.5;
}

button {
    background: var(--surface-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    backdrop-filter: blur(10px);
}

button:hover {
    background: var(--tertiary-black);
    border-color: var(--primary-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-subtle);
}

button:disabled {
    background: var(--surface-darker);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
}

button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.night-fare-option {
    padding: 20px 0;
}

.night-fare-option label {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.night-fare-option input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-gold);
    cursor: pointer;
}

.map-section {
    background: var(--surface-dark);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-luxury);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-gold);
    opacity: 0.6;
}

#map {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.result-section {
    background: var(--surface-dark);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-luxury);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.result-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    opacity: 0.8;
}

#calculate-btn {
    background: var(--gradient-gold);
    color: var(--primary-black);
    margin-bottom: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

#calculate-btn:hover {
    background: linear-gradient(135deg, #f4e4bc 0%, #d4af37 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.5);
}

#calculate-btn:disabled {
    background: var(--surface-darker);
    color: var(--text-muted);
    box-shadow: none;
    transform: none;
}

#result-display {
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
}

.result-hidden {
    display: none;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 0.2px;
}

.amount {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--surface-dark);
    border-radius: 16px;
    padding: 32px;
    margin: 0 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-luxury);
    border: 1px solid var(--border-subtle);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#address-input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 24px;
    background: var(--surface-darker);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#address-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

#address-input::placeholder {
    color: var(--text-muted);
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-buttons button {
    flex: 1;
    margin: 0;
}

#save-address-btn {
    background: var(--gradient-gold);
    color: var(--primary-black);
    border: none;
    font-weight: 600;
}

#save-address-btn:hover {
    background: linear-gradient(135deg, #f4e4bc 0%, #d4af37 100%);
}

#cancel-address-btn {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

#cancel-address-btn:hover {
    background: var(--surface-darker);
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .location-section, .map-section, .result-section {
        padding: 20px;
    }
    
    main {
        padding: 24px 0;
    }
    
    .modal-content {
        padding: 24px;
        margin: 0 16px;
    }
}

/* ã‚¹ã‚¯ãƒ­ãƒ¼ãƒ«ãƒãƒ¼ã®ã‚¹ã‚¿ã‚¤ãƒªãƒ³ã‚° */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gold);
}

/* ã‚»ãƒ¬ã‚¯ã‚·ãƒ§ãƒ³è‰² */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
}

/* ãƒ•ã‚©ãƒ¼ã‚«ã‚¹ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ */
*:focus-visible {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}