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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

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

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

.tabs {
    display: flex;
    gap: 0;
}

.tab {
    padding: 12px 32px;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-icon {
    width: 18px;
    height: 18px;
}

.tab:first-child {
    border-radius: 8px 0 0 8px;
}

.tab:last-child {
    border-radius: 0 8px 8px 0;
}

.tab:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.tab.active {
    background: #333;
    color: #fff;
}

.tab:hover:not(.active) {
    background: #d0d0d0;
}

.location-select {
    padding: 10px 16px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
}

.location-select:disabled {
    background: #eee;
    color: #999;
    cursor: not-allowed;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}

.card .remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: #eee;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.card .remove-btn:hover {
    background: #ff4444;
    color: #fff;
}

.card .location {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-icon {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card .time {
    font-size: 36px;
    font-weight: 600;
    color: #222;
}

.card .date {
    font-size: 14px;
    color: #888;
    margin-top: 8px;
}

.card .ampm {
    font-size: 18px;
    font-weight: 400;
    color: #666;
    margin-left: 4px;
}

.limit-msg {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    text-align: right;
}

/* Time styles */
.time-search {
    margin-bottom: 20px;
    max-width: 400px;
}

.time-search .location-select {
    width: 100%;
}

.time-search .limit-msg {
    text-align: left;
}

/* Weather styles */
.weather-search {
    position: relative;
    margin-bottom: 20px;
    max-width: 400px;
}

.city-search {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.city-search:focus {
    outline: none;
    border-color: #333;
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.city-suggestions.show {
    display: block;
}

.city-suggestion {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.city-suggestion:last-child {
    border-bottom: none;
}

.city-suggestion:hover {
    background: #f5f5f5;
}

.weather-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
}

.weather-card .remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: #eee;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.weather-card .remove-btn:hover {
    background: #ff4444;
    color: #fff;
}

.weather-card .location {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-card .temp {
    font-size: 48px;
    font-weight: 600;
    color: #222;
}

.weather-card .temp-unit {
    font-size: 24px;
    font-weight: 400;
    color: #666;
}

.weather-card .condition {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
}

.weather-card .details {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.weather-card .detail {
    font-size: 13px;
    color: #888;
}

.weather-card .detail-value {
    font-weight: 600;
    color: #444;
}

.no-weather {
    color: #666;
    padding: 20px 0;
}

/* Game styles */
.game-frame {
    width: 100%;
    height: calc(100vh - 120px);
    border: none;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
