/**
 * SALS Lettered Shadow Identity - Styles
 * Milestone 2 UI Styling
 */

/* SALS Section */
#salsSection {
    animation: fadeInUp 0.6s ease-out;
}

/* Occupation Search */
.sals-occupation-section {
    margin-bottom: 2rem;
}

.occupation-search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.3s ease;
}

.occupation-search-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Occupation Results Dropdown */
.occupation-results {
    position: relative;
    margin-top: 0.5rem;
    background: rgba(17, 24, 39, 0.95);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    animation: slideDown 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-count {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.results-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.results-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.occupation-result-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.occupation-result-item:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.occupation-result-name {
    font-weight: 500;
    color: white;
}

.occupation-result-gate {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gate-badge-small {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.gate-code-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Selected Occupation Card */
.selected-occupation-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(109, 40, 217, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.occupation-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.occupation-icon {
    font-size: 2.5rem;
}

.occupation-details h4 {
    margin: 0 0 0.5rem 0;
    color: white;
    font-size: 1.25rem;
}

.gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.gate-badge .gate-letter {
    font-size: 1.25rem;
}

.gate-badge .gate-meaning {
    font-size: 0.875rem;
    opacity: 0.9;
}

.btn-change-occupation {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-change-occupation:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Gate Legend */
.gate-legend {
    margin: 2rem 0;
    padding: 1.75rem 1.75rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gate-legend h3 {
    margin: 0 0 1.25rem 0;
    color: white;
    font-size: 1.15rem;
    text-align: center;
    letter-spacing: 0.04em;
}

.gate-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .gate-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 560px) {
    .gate-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gate-item {
    padding: 1rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: default;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100px;
}

.gate-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gate-item.has-subcategories {
    border-color: rgba(255, 215, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.07), rgba(255, 215, 0, 0.02));
}

.gate-item.has-subcategories:hover {
    border-color: rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.13), rgba(255, 215, 0, 0.05));
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.gate-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(109, 40, 217, 0.2));
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.35);
    transform: translateY(-2px);
}

.gate-letter-display {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: #8b5cf6;
    line-height: 1;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.gate-item.active .gate-letter-display {
    color: #a78bfa;
}

.gate-name {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.gate-item.active .gate-name {
    color: white;
}

.gate-description {
    display: block;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.2rem;
    font-style: italic;
    line-height: 1.3;
}

.gate-item.active .gate-description {
    color: rgba(255, 255, 255, 0.75);
}

.gate-expand-hint {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 215, 0, 0.55);
    margin-top: 0.35rem;
    line-height: 1;
}

/* ─── Easterner Tree Panel ───────────────────────────────────────────── */
.easterner-tree {
    margin-top: 1.5rem;
    padding: 1.5rem 1.25rem 1.25rem;
    background: linear-gradient(160deg, rgba(255, 215, 0, 0.06) 0%, rgba(255, 215, 0, 0.02) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.easterner-tree-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
}

.easterner-tree-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #FFD700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.easterner-tree-sublabel {
    font-size: 0.7rem;
    color: rgba(255, 215, 0, 0.55);
    font-style: italic;
}

/* Vertical stem lines */
.tree-stem {
    width: 2px;
    height: 24px;
    background: linear-gradient(to bottom, rgba(255, 215, 0, 0.7), rgba(255, 215, 0, 0.4));
    border-radius: 1px;
    flex-shrink: 0;
}

.tree-stem-islanders {
    height: 20px;
}

.tree-islanders-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.5);
    margin-bottom: 0;
}

/* Horizontal branch lines */
.tree-branch-line {
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 215, 0, 0.55), transparent);
    border-radius: 1px;
    flex-shrink: 0;
    align-self: stretch;
    margin: 0 2rem;
}

/* Subcategory Pills */
.subcategory-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.subcategory-pills.core-row {
    padding: 0.5rem 0;
}

.subcategory-pills.jewels-row {
    padding: 0.5rem 0 0;
}

.subcategory-pill {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
    border: 2px solid rgba(255, 215, 0, 0.28);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    min-width: 130px;
    max-width: 180px;
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.subcategory-pill:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.65);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

/* Islander parent pill */
.subcategory-pill.islander-parent {
    border-color: rgba(255, 215, 0, 0.55);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 180, 0, 0.08));
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.15);
}

.subcategory-pill.islander-parent:hover {
    box-shadow: 0 8px 28px rgba(255, 215, 0, 0.45);
    border-color: #FFD700;
}

/* Jewel pill variant */
.subcategory-pill.jewel-pill {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 180, 0, 0.06));
    border-color: rgba(255, 215, 0, 0.45);
    min-width: 120px;
}

.subcategory-pill.jewel-pill:hover {
    border-color: #FFD700;
    box-shadow: 0 8px 28px rgba(255, 215, 0, 0.45);
}

.pill-icon {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.pill-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.pill-subtitle {
    font-size: 0.62rem;
    color: rgba(255, 215, 0, 0.62);
    font-style: italic;
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 768px) {
    .subcategory-pills {
        flex-direction: column;
        align-items: center;
    }
    .subcategory-pill {
        max-width: 280px;
        width: 100%;
    }
    .tree-branch-line {
        margin: 0 1rem;
    }
}

/* Gold styling for Easterner (second E) */
.easterner-gold {
    color: #FFD700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.gate-item.active .easterner-gold {
    color: #FFC700 !important;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

/* Smart viewport-aware tooltip */
#smart-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: rgba(17, 24, 39, 0.97);
    border: 1px solid rgba(139, 92, 246, 0.55);
    border-radius: 8px;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.55;
    white-space: normal;
    word-break: break-word;
    max-width: min(440px, calc(100vw - 20px));
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    text-align: left;
}

#smart-tooltip.tt-visible {
    opacity: 1;
}

#smart-tooltip.tt-jewel {
    border-color: rgba(255, 215, 0, 0.55);
}

/* SALS Actions */
.sals-actions {
    margin: 2rem 0;
}

.creation-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.status-loading {
    color: #60a5fa;
    animation: pulse 2s infinite;
}

.status-success {
    color: #34d399;
}

.status-error {
    color: #f87171;
}

/* Shadow Display */
.shadow-display {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(109, 40, 217, 0.05));
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    animation: fadeIn 0.5s ease-out;
}

.shadow-display h3 {
    margin: 0 0 1.5rem 0;
    color: white;
    text-align: center;
    font-size: 1.5rem;
}

.shadow-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.shadow-image {
    width: 100%;
    max-width: 512px;
    height: auto;
    border-radius: 12px;
    background: white;
    padding: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.shadow-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shadow-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.detail-value {
    font-size: 1.1rem;
    color: white;
    font-weight: 600;
}

.shadow-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.shadow-actions .btn {
    flex: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Pre-Generated Silhouettes Section */
.pregenerated-section {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(17, 24, 39, 0.5);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    animation: fadeInUp 0.5s ease-out;
}

.pregenerated-section h3 {
    color: #8b5cf6;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.section-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.option-box {
    transition: all 0.3s ease;
}

.option-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.pregenerated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pregenerated-option {
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pregenerated-option:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

.pregenerated-option.selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.pregenerated-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.pregenerated-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.pregenerated-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pregenerated-option:hover .pregenerated-overlay {
    opacity: 1;
}

.btn-select-pregenerated {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-pregenerated:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
}

.pregenerated-label {
    padding: 0.75rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Custom Generation Prompt */
.custom-generation-prompt {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.custom-generation-prompt p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.btn-custom-generation {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-custom-generation:hover {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

/* Selected Pre-Generated Display */
#selectedPregeneratedDisplay {
    margin-top: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

.selected-pregenerated-card {
    padding: 2rem;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.selected-preview {
    max-width: 300px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: white;
    padding: 1rem;
}

.selected-pregenerated-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-confirm-selection {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-confirm-selection:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-change-selection {
    padding: 0.875rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-change-selection:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Custom Generation Dialog */
.custom-generation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.dialog-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease-out;
}

.dialog-content h3 {
    color: #8b5cf6;
    margin-bottom: 1rem;
}

.dialog-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.dialog-note {
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid #8b5cf6;
    border-radius: 8px;
    font-size: 0.9rem;
}

.dialog-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-cancel, .btn-confirm {
    flex: 1;
    padding: 0.875rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-confirm {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

/* Custom Generation Only (No Pre-Generated) */
.custom-generation-only {
    text-align: center;
    padding: 3rem 2rem;
}

.btn-custom-generation-large {
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-custom-generation-large:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6);
}

/* Status Messages */
.shadow-status {
    margin: 2rem 0;
    animation: fadeInUp 0.5s ease-out;
}

.status-loading, .status-success, .status-error {
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.status-loading {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Hierarchical Occupation Selection */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.98));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 1.75rem;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.subcategory-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subcategory-card:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(109, 40, 217, 0.15));
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.subcategory-card h3 {
    margin: 0 0 0.75rem 0;
    color: #a78bfa;
    font-size: 1.25rem;
}

.subcategory-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.subcategory-occupations {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.subcategory-occupations strong {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.subcategory-occupations ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.subcategory-occupations li {
    color: rgba(255, 255, 255, 0.6);
    padding: 0.25rem 0;
}

.subcategory-occupations li em {
    color: rgba(139, 92, 246, 0.8);
}

.subcategory-card .btn {
    width: 100%;
    margin-top: 1rem;
}

.easterner-dialog {
    min-width: 800px;
}

@media (max-width: 900px) {
    .easterner-dialog {
        min-width: auto;
        width: 95%;
    }
    
    .subcategory-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .shadow-container {
        grid-template-columns: 1fr;
    }
    
    .gate-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .selected-occupation-card {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .shadow-actions {
        flex-direction: column;
    }
    
    .pregenerated-grid {
        grid-template-columns: 1fr;
    }
    
    .dialog-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .dialog-actions {
        flex-direction: column;
    }
}

/* Custom Occupation Prompt */
.custom-occupation-prompt {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    text-align: center;
}

.custom-occupation-prompt p {
    margin: 0 0 0.75rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.btn-add-custom-occupation {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-add-custom-occupation:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Custom Occupation Dialog */
.custom-occupation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(5px);
}

.custom-occupation-dialog .dialog-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(17, 24, 39, 0.95));
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease-out;
}

.custom-occupation-dialog h3 {
    margin: 0 0 0.5rem 0;
    color: #8b5cf6;
    font-size: 1.5rem;
}

.custom-occupation-dialog p {
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.7);
}

.custom-occupation-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.custom-occupation-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.custom-occupation-dialog .dialog-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

.custom-occupation-dialog .btn-cancel {
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-occupation-dialog .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.custom-occupation-dialog .btn-create {
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-occupation-dialog .btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
}

.custom-occupation-dialog .btn-create:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Gate Letter Selection in Custom Occupation Dialog */
.gate-letter-selection {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.gate-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gate-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
}

.gate-option.selected {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.gate-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gate-option-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gate-badge-large {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.gate-option[data-gate="F"] .gate-badge-large {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
}

.gate-option[data-gate="R"] .gate-badge-large {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
}

.gate-option[data-gate="E"] .gate-badge-large {
    background: linear-gradient(135deg, #10b981, #14b8a6);
}

.gate-option[data-gate="D"] .gate-badge-large {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.gate-option[data-gate="O"] .gate-badge-large {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.gate-option[data-gate="M"] .gate-badge-large {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.gate-info {
    flex: 1;
}

.gate-info strong {
    display: block;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.gate-info small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Notification Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}
