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

body {
    font-family: 'Roboto', sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 370px;
    background: #2a2a2a;
    padding: 30px 20px 10px 20px;
    border-right: 1px solid #3a3a3a;
    display: flex;
    flex-direction: column;
}

.divider {
    height: 1px;
    background: #4a4a4a;
    margin: 0px 0 8px;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 5px,
        #4a4a4a 5px,
        #4a4a4a 10px
    );
}

.scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
    max-height: calc(100vh - 400px);
}

.scrollable-content::-webkit-scrollbar {
    width: 6px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 3px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #5a5a5a;
}

.sidebar h1 {
    font-size: 20px;
    margin: -15px 0 10px;
    padding-left: 10px;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
}

.title-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.title-container h1 {
    margin: 0;
    padding-left: 10px;
    flex: 1;
    padding-top: 2px;
}

.version-selector {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: 10px;
}

.version-btn {
    padding: 2px 8px;
    font-size: 10px;
    background: transparent;
    border: 1px solid #4ade80;
    color: #4ade80;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.version-btn:hover {
    background: rgba(74, 222, 128, 0.15);
}

.version-btn.active {
    background: rgba(74, 222, 128, 0.3);
    color: #4ade80;
    border-color: #4ade80;
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 400;
}

.map-control {
    margin-top: -10px;
    margin-bottom: 5px;
}

.map-label {
    margin-top: 8px;
    margin-bottom: 0;
    text-align: center;
}

.control-group input[type="text"],
.control-group select {
    width: 100%;
    padding: 12px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
}

/* City and locate button row */
.city-locate-row {
    margin-bottom: 15px;
}

.city-locate-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.city-locate-container input[type="text"] {
    flex: 1;
    width: auto;
    min-width: 0;
}

.city-locate-container .btn.secondary {
    white-space: nowrap;
    padding: 8px 12px;
    flex-shrink: 0;
    font-size: 20px;
}

.control-group input[type="text"]:focus,
.control-group select:focus {
    outline: none;
    border-color: #6a6a6a;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
}

#distanceValue {
    display: block;
    font-size: 12px;
    color: #b0b0b0;
    text-align: right;
}

.size-options {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: space-between;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    background: #3a3a3a;
    border-radius: 6px;
    transition: background 0.2s;
}

.radio-label:hover {
    background: #4a4a4a;
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    accent-color: #6a6a6a;
}

.radio-label span {
    font-size: 14px;
    color: #ffffff;
}

/* Size icon styles */
.radio-label.size-icon {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    flex: 1;
    min-height: 40px;
    position: relative;
    display: flex;
}

.radio-label.size-icon input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.size-shape {
    background: transparent;
    border: 1px dashed #ffffff;
    border-radius: 2px;
    transition: all 0.2s;
    display: block;
}

.size-shape.portrait {
    height: 30px;
    width: 20px;
}

.size-shape.landscape {
    height: 20px;
    width: 30px;
}

.size-shape.square {
    height: 25px;
    width: 25px;
}

/* Selected state */
.radio-label.size-icon input[type="radio"]:checked + .size-shape {
    border-color: #4a9eff;
    background: #2a4a6a;
}

.radio-label.size-icon:hover .size-shape {
    border-color: #6a6a6a;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn.primary {
    background: #4a9eff;
    color: #ffffff;
}

.btn.primary:hover:not(:disabled) {
    background: #3a8eef;
}

.btn.primary:disabled {
    background: #3a3a3a;
    cursor: not-allowed;
    color: #6a6a6a;
}

.btn.secondary {
    background: #5a5a5a;
    color: #ffffff;
}

.btn.secondary:hover:not(:disabled) {
    background: #6a6a6a;
}

.btn.secondary:disabled {
    background: #3a3a3a;
    cursor: not-allowed;
    color: #6a6a6a;
}

.btn.export-available {
    background: #2a7a2a;
    color: #ffffff;
}

.btn.export-available:hover {
    background: #3a8a3a;
}

.status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.status.success {
    display: block;
    background: #2a5a2a;
    color: #8f8;
    border: 1px solid #3a6a3a;
}

.status.error {
    display: block;
    background: #5a2a2a;
    color: #f88;
    border: 1px solid #6a3a3a;
}

.status.info {
    display: block;
    background: #2a3a5a;
    color: #88f;
    border: 1px solid #3a4a6a;
}

.debug-info {
    margin-top: 20px;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #3a3a3a;
    font-size: 12px;
}

.debug-info h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #b0b0b0;
}

.debug-info p {
    margin: 5px 0;
    color: #808080;
}

.debug-info span {
    color: #4a9eff;
    font-weight: 600;
}

.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    padding: 20px;
    overflow: hidden;
}

.poster-preview {
    flex: 1;
    width: 100%;
    background: #2a2a2a;
    border-radius: 8px;
    border: 2px dashed #4a4a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.poster-preview::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px dashed #5a5a5a;
    border-radius: 4px;
    pointer-events: none;
}

.poster-preview::after {
    content: 'Poster Preview Area';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5a5a5a;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    z-index: 1;
}

.poster-preview.has-content::after {
    display: none;
}

.poster-content {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.poster-map {
    width: 100%;
    height: 100%;
    position: relative;
}

.poster-map .mapboxgl-map {
    background: transparent !important;
}

.map-selector .mapboxgl-map {
    height: 100%;
    width: 100%;
}

.poster-text {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    padding: 20px 20px 20px 20px;
    text-align: center;
    z-index: 10;
}

.city-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 5px;
}

.decorative-line {
    width: 40%;
    height: 0.5px;
    margin: 0 auto 10px;
    background: currentColor;
}

.country-name {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 8px;
}

.coordinates {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.7;
}

.attribution {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 10px;
    opacity: 0.6;
}

.mapboxgl-ctrl-attrib {
    display: none !important;
}

.mapboxgl-ctrl-logo {
    display: none !important;
}

.poster-gradient-top,
.poster-gradient-bottom {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 5;
}

.poster-gradient-top {
    top: 0;
    height: 5%;
}

.poster-gradient-bottom {
    bottom: 0;
    height: 40%;
}

.map-selector {
    height: 250px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
    position: relative;
}



.distance-info {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #b0b0b0;
    font-weight: 500;
}

#currentDistance {
    color: #4a9eff;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        height: auto;
        overflow-y: auto;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #3a3a3a;
    }
    
    .preview-area {
        height: 600px;
    }
    
    .map-selector {
        height: 250px;
    }
}

.progress-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    padding: 10px;
    z-index: 100;
    display: none;
}

.progress-container.active {
    display: block;
}

.progress-text {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #6ab7ff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

