/**
 * UI Styles - Buttons, inputs, panels, and interactive elements
 */

/* Buttons */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 5px;
    background: #2a2a2a;
    padding: 4px;
    border-radius: 8px;
}

.mode-btn {
    padding: 8px 16px;
    background: transparent;
    color: #e0e0e0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mode-btn:hover {
    background: rgba(52, 152, 219, 0.2);
}

.mode-btn.active {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

/* Tool Buttons */
.tool-btn {
    padding: 8px 12px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-btn:hover {
    background: #3a3a3a;
    border-color: #3498db;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tool-btn.active {
    background: #3498db;
    border-color: #2980b9;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.tool-icon {
    font-size: 16px;
}

/* Inputs */
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 2px solid #2a2a2a;
    border-radius: 5px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

input[type="color"] {
    width: 100%;
    height: 40px;
    border: 2px solid #2a2a2a;
    border-radius: 5px;
    cursor: pointer;
}

.search-input {
    margin-bottom: 10px;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* World List */
.world-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.world-item {
    padding: 12px;
    background: #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.world-item:hover {
    background: #3a3a3a;
    transform: translateX(3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.world-item.active {
    border-color: #3498db;
    background: #2a4a5a;
}

.world-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #e0e0e0;
}

.world-item-date {
    font-size: 12px;
    color: #95a5a6;
}

/* World Controls */
.world-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Catalog Panel */
.catalog-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #2a2a2a;
    padding-bottom: 10px;
}

.category-tab {
    padding: 8px 12px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.category-tab:hover {
    background: #3a3a3a;
}

.category-tab.active {
    background: #3498db;
    border-color: #2980b9;
    color: white;
}

.category-content-wrapper {
    flex: 1;
    overflow-y: auto;
}

.category-content {
    display: none;
}

.object-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.object-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.object-item:hover {
    background: #3a3a3a;
    border-color: #3498db;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.object-item.selected {
    border-color: #3498db;
    background: #2a4a5a;
}

.object-preview {
    border-radius: 3px;
    margin-bottom: 5px;
}

.object-name {
    font-size: 11px;
    color: #e0e0e0;
    text-align: center;
    word-break: break-word;
}

/* Properties Panel */
.properties-panel {
    border-top: 2px solid #2a2a2a;
}

.property-group {
    margin-bottom: 15px;
}

.property-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #e0e0e0;
}

.rotation-controls {
    display: flex;
    gap: 5px;
}

.rotation-btn {
    flex: 1;
    padding: 8px;
    background: #2a2a2a;
    color: #e0e0e0;
    border: 2px solid #3a3a3a;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.rotation-btn:hover {
    background: #3a3a3a;
    border-color: #3498db;
}

.rotation-btn:active {
    background: #3498db;
    border-color: #2980b9;
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2a2a2a;
    padding: 5px 10px;
    border-radius: 5px;
}

.zoom-btn {
    width: 28px;
    height: 28px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: #2980b9;
}

#zoomLevel {
    color: #e0e0e0;
    font-size: 13px;
    min-width: 45px;
    text-align: center;
}

/* Play Mode Hint */
.play-mode-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    transition: opacity 0.5s ease;
}

/* Ad countdown overlay for fullscreen ads */
.ad-countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
}

.ad-countdown.hidden {
    display: none;
}

.ad-countdown-content {
    background: rgba(0, 0, 0, 0.9);
    padding: 24px 40px;
    border-radius: 12px;
    border: 2px solid #3498db;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    text-align: center;
}

.ad-countdown-text {
    color: #e0e0e0;
    font-size: 16px;
    margin-bottom: 8px;
}

.ad-countdown-number {
    color: #3498db;
    font-size: 32px;
    font-weight: 700;
}

.hint-content {
    background: rgba(0, 0, 0, 0.85);
    padding: 30px 40px;
    border-radius: 12px;
    border: 2px solid #3498db;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.hint-content h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 20px;
}

.hint-content p {
    color: #e0e0e0;
    margin: 8px 0;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .left-panel {
        width: 240px;
    }
    
    .right-panel {
        width: 280px;
    }
}

@media (max-width: 1200px) {
    .top-toolbar {
        padding: 10px 15px;
        gap: 15px;
    }
    
    .tool-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

