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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    min-height: 100vh;
    padding: 20px;
    color: #000;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: normal;
}

.subtitle {
    font-size: 0.9rem;
    color: #666;
}

.caption {
    font-size: 0.7rem;
    color: #999;
    margin-top: 8px;
    font-weight: normal;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.aura-display {
    position: relative;
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.aura-container {
    padding: 40px;
}

.aura-visualization {
    width: 400px;
    height: 400px;
    position: relative;
    transition: clip-path 0.5s ease, background 0.5s ease, filter 0.5s ease, transform 0.5s ease, opacity 0.5s ease, box-shadow 0.5s ease, border-radius 0.5s ease;
    will-change: clip-path, background, filter, transform, box-shadow, border-radius;
}

.weather-info {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px 20px;
    color: #000;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.info-item {
    margin: 6px 0;
    font-size: 0.9rem;
}

.info-item.location-item {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.info-item .label {
    color: #666;
    margin-right: 8px;
}

.info-item.inclement-item {
    position: relative;
    cursor: help;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

.inclement-value {
    font-weight: 500;
    color: #000;
}

.inclement-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 12px 16px;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    max-width: calc(100vw - 40px);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    border: 1px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: left;
}

@media (max-width: 600px) {
    .inclement-tooltip {
        width: 240px;
        font-size: 0.7rem;
        padding: 10px 12px;
    }
    
    .tooltip-factor {
        font-size: 0.65rem;
    }
    
    .factor-contribution {
        font-size: 0.6rem;
    }
}

.inclement-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #000;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tooltip-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tooltip-title {
    font-weight: 500;
    margin-bottom: 4px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
    font-size: 0.8rem;
}

.tooltip-value {
    color: #fff;
    font-size: 0.75rem;
}

.tooltip-factor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    margin: 2px 0;
}

.factor-name {
    flex: 1;
    color: #ccc;
}

.factor-value {
    color: #fff;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

.factor-contribution {
    color: #999;
    font-size: 0.65rem;
    min-width: 60px;
    text-align: right;
}

.controls-panel {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.control-group {
    margin-bottom: 20px;
}

.control-group h3 {
    color: #000;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

label {
    display: block;
    margin-bottom: 15px;
}

label span {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #333;
    font-size: 0.85rem;
}

input[type="number"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

input[type="number"]:focus {
    outline: 1px solid #000;
    border-color: #000;
}

input[type="range"] {
    width: 100%;
    height: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #000;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #000;
    cursor: pointer;
    border: none;
}

.value-display {
    display: inline-block;
    margin-left: 8px;
    font-weight: normal;
    color: #000;
    font-size: 0.85rem;
}

.search-container {
    display: flex;
    gap: 8px;
}

#location-search {
    flex: 1;
    padding: 6px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

#location-search:focus {
    outline: 1px solid #000;
    border-color: #000;
}

.btn-search {
    padding: 6px 12px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-search:hover:not(:disabled) {
    background: #000;
    color: #fff;
}

.btn-search:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-status {
    margin-top: 5px;
    font-size: 0.8rem;
    min-height: 16px;
}

.search-status.error {
    color: #000;
}

.search-status.success {
    color: #000;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mode-selector .mode-btn[data-mode="randomizer"] {
    grid-column: span 3;
    background: #fff;
    color: #000;
    border-color: #000;
}

.mode-selector .mode-btn[data-mode="randomizer"]:hover {
    background: #000;
    color: #fff;
}

.mode-selector .mode-btn[data-mode="randomizer"].active {
    background: #000;
    color: #fff;
}

.mode-btn {
    padding: 8px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.85rem;
    position: relative;
}

.mode-btn:hover {
    background: #000;
    color: #fff;
}

.mode-btn.active {
    background: #000;
    color: #fff;
}

.mode-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    padding: 10px 12px;
    background: #000;
    color: #fff;
    font-size: 0.55rem;
    line-height: 1.4;
    white-space: normal;
    width: 400px;
    max-width: calc(100vw - 20px);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    border: 1px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.mode-btn:hover .mode-tooltip {
    opacity: 1;
}

.mode-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 5px solid transparent;
    border-top-color: #000;
}

.mode-tooltip-title {
    font-weight: 500;
    margin-bottom: 6px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}

.mode-tooltip-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mode-tooltip-list li {
    margin: 4px 0;
    padding-left: 12px;
    position: relative;
}

.mode-tooltip-list li::before {
    content: '•';
    position: absolute;
    left: 0;
}

.btn-randomize,
.btn-reset {
    width: 100%;
    padding: 8px;
    border: 1px solid #000;
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 8px;
    background: #fff;
    color: #000;
}

.btn-randomize:hover,
.btn-reset:hover {
    background: #000;
    color: #fff;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .aura-visualization {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.2rem;
    }
    
    .aura-visualization {
        width: 250px;
        height: 250px;
    }
    
    .control-row {
        grid-template-columns: 1fr;
    }
}
