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

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

.container {
    max-width: 400px;
    width: 100%;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.subtitle {
    color: #9aa5b1;
    font-size: 0.95rem;
}

main {
    background: #16213e;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.location-selector {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #9aa5b1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    background: #0f3460;
    border: 1px solid #1a4b8c;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

select:focus {
    outline: none;
    border-color: #e94560;
}

.actions {
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #e94560, #c23a51);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    flex: 1;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    flex: 1;
}

.btn-secondary {
    background: transparent;
    color: #9aa5b1;
    border: 1px solid #3d5a80;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: #5d7a9a;
    color: #d1d5db;
}

.btn-skip {
    background: transparent;
    color: #9aa5b1;
    border: 1px solid #3d5a80;
    padding: 8px 16px;
    font-size: 0.85rem;
    margin-top: 15px;
    width: 100%;
}

.btn-skip:hover {
    border-color: #5d7a9a;
    color: #d1d5db;
}

.current-location {
    background: #1e3a5f;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.location-info {
    font-size: 0.95rem;
}

#location-country {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.view-link {
    color: #5dccff;
    text-decoration: none;
    font-size: 0.9rem;
}

.view-link:hover {
    text-decoration: underline;
    color: #8fddff;
}

.rating-section {
    text-align: center;
    margin-bottom: 20px;
}

.session-stats {
    color: #b0b8c1;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.session-stats strong {
    color: #fff;
    font-size: 1.2rem;
}

.rating-buttons {
    display: flex;
    gap: 15px;
}

.history-toggle {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #1a4b8c;
}

footer {
    text-align: center;
    margin-top: 20px;
}

footer a {
    color: #5d7a9a;
    text-decoration: none;
    font-size: 0.85rem;
}

footer a:hover {
    color: #8fddff;
}

.hidden {
    display: none !important;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #16213e;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #fff;
}

#summary-content,
#history-content {
    margin-bottom: 25px;
    text-align: left;
}

#summary-content p {
    margin-bottom: 10px;
    color: #d1d5db;
}

#summary-content strong {
    color: #fff;
}

#summary-content .ugly-location {
    background: #1e3a5f;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

#summary-content .ugly-location a {
    color: #5dccff;
}

#summary-content .ugly-location a:hover {
    color: #8fddff;
}

#history-content {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: #1e3a5f;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.history-item-date {
    font-size: 0.8rem;
    color: #9aa5b1;
    margin-bottom: 5px;
}

.history-item-stats {
    font-size: 0.9rem;
    color: #d1d5db;
}

.history-item-stats a {
    color: #5dccff;
}

.history-item-stats a:hover {
    color: #8fddff;
}

.no-history {
    color: #9aa5b1;
    font-style: italic;
    text-align: center;
}

/* Loading state */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '...';
    animation: dots 1s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
