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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

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

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
    float: auto;
}

#map-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

#map-container svg {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    margin: 0 auto;
}

.country {
    fill: #e0e0e0;
    stroke: #fff;
    stroke-width: 0.5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country:hover {
    fill: #bdbdbd;
    stroke-width: 1;
}

.country.visited {
    fill: #4caf50;
}

.country.visited:hover {
    fill: #45a049;
}

.country.selected {
    fill: #ff9800;
    stroke: #333;
    stroke-width: 2;
}

.country.highlighted {
    fill: #ffd700;
    stroke: #ff6b00;
    stroke-width: 3;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

#info-panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

#info-panel.hidden {
    display: none;
}

#info-panel h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save {
    background: #4caf50;
    color: white;
}

.btn-save:hover {
    background: #45a049;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #da190b;
}

.btn-cancel {
    background: #9e9e9e;
    color: white;
}

.btn-cancel:hover {
    background: #757575;
}

.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    pointer-events: none;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip.hidden {
    display: none;
}

.tooltip h3 {
    margin-bottom: 8px;
    font-size: 1.1em;
}

.tooltip p {
    margin: 4px 0;
    line-height: 1.4;
}

.wheel-section {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    text-align: center;
}

.wheel-section h2 {
    color: white;
    margin-bottom: 25px;
    font-size: 2em;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.wheel-display {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 8px solid #ffd700;
    position: relative;
    overflow: hidden;
}

.wheel-display::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 45%, rgba(255, 215, 0, 0.3) 50%, transparent 55%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.wheel-display span {
    z-index: 1;
    text-align: center;
    padding: 20px;
    max-width: 80%;
    word-wrap: break-word;
}

.wheel-display.spinning {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-spin {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    border: 3px solid #ffed4e;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-spin:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.btn-spin:active {
    transform: scale(0.98);
}

.btn-spin:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    border-color: #999;
}

.stats {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 1.2em;
    color: #333;
}

.stats span {
    font-weight: bold;
    color: #667eea;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.modal-content p {
    color: #666;
    margin-bottom: 20px;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: #667eea;
}

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

.password-error {
    color: #f44336;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 0;
}

.password-error.hidden {
    display: none;
}

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

    #info-panel {
        display: block;
    }
}
