body {
    font-family: Arial;
    color:white;
    display:flex;
    padding:20px;
    margin:0;
}

.overlay {
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.65);
    z-index:-1;
}

.board { 
    display:flex; 
    flex-direction:column;
    gap:10px;
    align-items:center;
}

.board-title {
    margin:0;
    text-align:center;
    font-size:18px;
}

.board-subtitle {
    margin:5px 0 0 0;
    text-align:center;
    font-size:12px;
    color:#aaa;
}

.board-grid {
    display:flex;
    gap:30px;
}

.column {
    display:flex;
    flex-direction:column;
    gap:10px;
}

.column.right { justify-content:center; }

.slot {
    width:54px;
    height:54px;
    background:#333;
    border:2px solid #555;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-weight:bold;
    font-size:14px;
    color:#aaa;
}

.slot img {
    width:100%;
    height:100%;
    object-fit:cover;
}

.slot:hover { border-color:gold; }

.panel { margin-left:40px; width:350px; }

.panel h2 {
    font-size:16px;
    margin:0;
}

.skillBox {
    margin-top:10px;
    padding:10px;
    background:#2a2a2a;
    border:1px solid #444;
    font-size:13px;
}

.selection {
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    background:#222;
    padding:20px;
    border:2px solid gold;
    display:none;
    width:auto;
    max-width:95vw;
    max-height:95vh;
    overflow-y:auto;
    overflow-x:hidden;
    z-index:1001;
}

.selection-overlay {
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    display:none;
    z-index:1000;
}

.selection h3 {
    margin: 10px 0;
    text-align: center;
}

.svetila-grid {
    display:grid;
    grid-template-columns:repeat(8, 1fr);
    gap:6px;
    max-width:950px;
}

.card {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:2px;
    background:#333;
    padding:5px;
    cursor:pointer;
    border-radius:5px;
    min-width:70px;
}

.card img { 
    width:60px; 
    height:60px; 
    object-fit:cover;
}

.card .name {
    font-size:9px;
    text-align:center;
    max-width:60px;
    white-space:normal;
    word-break:keep-all;
    hyphens:auto;
    line-height:1.2;
}

.card:hover { background:#444; }

/* Карточки политики - увеличенные на 30% */
.politika-card {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    background:#333;
    padding:7px;
    cursor:pointer;
    border-radius:5px;
    min-width:91px;
}

.politika-card img { 
    width:78px; 
    height:78px; 
    object-fit:cover;
}

.politika-card .name {
    font-size:10px;
    text-align:center;
    max-width:78px;
    white-space:normal;
    word-break:keep-all;
    hyphens:auto;
    line-height:1.2;
}

.politika-card:hover { background:#444; }

.grade-R { color:#3aa0ff; }
.grade-SR { color:#a84bff; }
.grade-SR { color:#a84bff; }
.grade-SSR { color:gold; }
.grade-SSR_RARE { color:gold; }
.grade-UR { color:#ff357a; }

button {
    margin-top:8px;
    padding:5px 10px;
    cursor:pointer;
    font-size:12px;
}

.selection > button {
    display:block;
    margin:0 auto 10px auto;
}

.locations-grid {
    display:flex;
    gap:20px;
    justify-content:center;
    margin-top:15px;
}

.location-btn {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    cursor:pointer;
    padding:15px;
    border-radius:10px;
    background:#333;
    transition:background 0.2s;
    min-height:120px;
}

.location-btn:hover {
    background:#444;
}

.location-btn img {
    width:180px;
    height:auto;
    border-radius:5px;
    object-fit:contain;
}

.location-btn span {
    font-weight:bold;
    font-size:14px;
}

.grade-header {
    font-weight:bold;
    font-size:16px;
    margin:15px 0 10px 0;
    padding:5px 10px;
    border-radius:5px;
    background:#333;
}

.grade-header.grade-R { color:#3aa0ff; }
.grade-header.grade-SR { color:#a84bff; }
.grade-header.grade-SR { color:#a84bff; }
.grade-header.grade-SSR { color:gold; }
.grade-header.grade-SSR_RARE { color:gold; }
.grade-header.grade-UR { color:#ff357a; }

/* ===== ЗВЕРИ ===== */

.zveri-board {
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-left:40px;
    align-items:center;
}

.zveri-board .board-title {
    font-size:18px;
    margin:0;
}

.zveri-board .board-subtitle {
    font-size:12px;
    margin:0;
}

.zveri-grid {
    display:flex;
    gap:10px;
}

.zveri-slot {
    width:45px;
    height:45px;
    background:#333;
    border:2px solid #555;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.zveri-slot img {
    width:100%;
    height:100%;
    object-fit:cover;
}

.zveri-slot:hover { border-color:gold; }

.zveri-panel {
    margin-left:20px;
    width:280px;
}

.zveri-panel h2 {
    font-size:16px;
    margin:0;
}

.zveri-panel .skillBox {
    margin-top:10px;
    padding:10px;
    font-size:13px;
}

.zveri-panel button {
    font-size:12px;
    padding:5px 10px;
}

.total-effects {
    margin-top:10px;
    padding:10px;
    background:#1a1a1a;
    border:1px solid #555;
    border-radius:5px;
    font-size:12px;
}

.total-effects h4 {
    margin:0 0 8px 0;
    color:gold;
    font-size:13px;
}

.total-effects .effect-line {
    margin:3px 0;
    color:#4CAF50;
}

.total-effects .effect-name {
    color:#aaa;
}

.total-effects .effect-number {
    color:gold;
    text-decoration:underline;
    font-weight:bold;
}

/* Грейды Зверей */
.grade-N { color:#4CAF50; }
.grade-R_ZVER { color:#3aa0ff; }
.grade-SR_ZVER { color:#a84bff; }
.grade-SSR_ZVER { color:gold; }
.grade-UR { color:#ff4444; }

.grade-header.grade-N { color:#4CAF50; }
.grade-header.grade-R_ZVER { color:#3aa0ff; }
.grade-header.grade-SR_ZVER { color:#a84bff; }
.grade-header.grade-SSR_ZVER { color:gold; }
.grade-header.grade-UR { color:#ff4444; }

/* ===== ПОЛИТИКА ===== */

.politika-board {
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-left:40px;
}

.politika-board .board-title {
    font-size:18px;
    margin:0;
}

.politika-board .board-subtitle {
    font-size:12px;
    margin:0;
}

.politika-grid {
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:10px;
}

.politika-slot-container {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:5px;
}

.politika-slot-label {
    font-size:11px;
    color:#aaa;
    text-align:center;
    max-width:71px;
    white-space:normal;
    word-break:keep-all;
    hyphens:auto;
    line-height:1.2;
}

.politika-columns {
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:10px;
    margin-bottom:8px;
}

.politika-column-title {
    text-align:center;
    font-size:13px;
    font-weight:bold;
    color:#ffd700;
}

.politika-slot {
    width:71px;
    height:71px;
    background:#333;
    border:2px solid #555;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.politika-slot img {
    width:100%;
    height:100%;
    object-fit:cover;
}

.politika-slot:hover { border-color:gold; }

.politika-panel {
    margin-left:20px;
    width:280px;
}

.politika-panel h2 {
    font-size:16px;
    margin:0;
}

.politika-panel .skillBox {
    margin-top:10px;
    padding:10px;
    font-size:13px;
}

.politika-panel button {
    font-size:12px;
    padding:5px 10px;
}

/* ===== ПРИВЕТСТВЕННЫЙ ЭКРАН ===== */

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background-image: url("assets/privetstvie.png");
    background-size: 65% auto;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: none;
}

.welcome-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.welcome-text {
    max-width: 550px;
    padding: 20px;
    padding-top: 100px;
    text-align: center;
    transition: opacity 0.6s ease;
}

.welcome-screen.hidden .welcome-text {
    opacity: 0;
}

.welcome-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: -40px;
}

.welcome-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 38px;
    font-weight: 700;
    color: #cc4400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
}

.explosion {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.8));
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.welcome-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 29px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

.welcome-description {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0 0 10px 0;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.welcome-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 15px 0;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.welcome-about {
    margin: 15px 0;
    margin-top: 50px;
    padding: 10px;
}

.welcome-about-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.welcome-about-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0 0 8px 0;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.welcome-about-text:last-child {
    margin-bottom: 0;
}

.welcome-button {
    display: inline-block;
    width: auto;
    padding: 12px 25px;
    margin: 15px auto 0 auto;
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease, opacity 0.6s ease;
    text-transform: none;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.welcome-screen.hidden .welcome-button {
    opacity: 0;
}

.welcome-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #A0522D 0%, #CD853F 50%, #A0522D 100%);
}

.welcome-button:active {
    transform: translateY(0);
}

/* Ambient Animated Background */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: #050508;
}

.ambient-blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
    border-radius: 50%;
    will-change: transform;
}

.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: rgba(58, 160, 255, 0.2); animation-delay: 0s; }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: rgba(168, 75, 255, 0.15); animation-delay: -5s; }
.blob-3 { top: 40%; left: 40%; width: 40vw; height: 40vw; background: rgba(255, 215, 0, 0.1); animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 10%) scale(1.1); }
    66% { transform: translate(-5%, -5%) scale(0.9); }
}

/* Glass Cards */
.glass-panel {
    background: rgba(15, 15, 20, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
    transform: translate3d(0, 0, 0);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Slot Styling */
.slot-base {
    aspect-ratio: 1;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.slot-base:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.slot-base .plus-icon {
    opacity: 0.5;
    transition: all 0.3s;
}
.slot-base:hover .plus-icon {
    opacity: 1;
    transform: scale(1.2);
}

.slot-filled {
    border-style: solid;
    border-width: 2px;
    background: rgba(0, 0, 0, 0.5);
}

.slot-filled img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.slot-filled:hover img {
    transform: scale(1.1);
}

/* Glow effects based on Grade */
.grade-n { border-color: var(--grade-n); box-shadow: 0 0 15px rgba(78,205,196,0.3); }
.grade-r { border-color: var(--grade-r); box-shadow: 0 0 15px rgba(58,160,255,0.3); }
.grade-sr { border-color: var(--grade-sr); box-shadow: 0 0 15px rgba(168,75,255,0.3); }
.grade-ssr { border-color: var(--grade-ssr); box-shadow: 0 0 20px rgba(255,215,0,0.4); }
.grade-ssr_rare { border-color: var(--grade-ssr-rare); box-shadow: 0 0 20px rgba(255,68,68,0.4); }
.grade-ur { border-color: var(--grade-ur); box-shadow: 0 0 25px rgba(255,53,122,0.5); }

/* Deleting Animation */
@keyframes poof {
    0% { transform: scale(1); filter: brightness(1); opacity: 1; }
    50% { transform: scale(1.2); filter: brightness(2); opacity: 0.8; }
    100% { transform: scale(0); filter: brightness(0); opacity: 0; }
}
.deleting { animation: poof 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* Modal Animations */
.modal-enter {
    animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.modal-backdrop-enter {
    animation: backdropFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes backdropFadeIn {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to { opacity: 1; backdrop-filter: blur(12px); }
}

/* Skill Box Styling */
.skill-box-active {
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border-top: 1px solid rgba(255,255,255,0.1);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.grade-badge {
    position: absolute;
    bottom: -6px;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
    z-index: 10;
}

/* ===== WELCOME MODAL ANIMATIONS ===== */

/* Float animation for icon */
@keyframes welcomeIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: welcomeIconFloat 3s ease-in-out infinite;
}

/* Welcome modal entrance animation */
@keyframes welcomeModalIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.welcome-modal-enter {
    animation: welcomeModalIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Welcome modal exit animation */
@keyframes welcomeModalOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
}

.welcome-modal-exit {
    animation: welcomeModalOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Backdrop entrance */
@keyframes welcomeBackdropIn {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
}

.welcome-backdrop-enter {
    animation: welcomeBackdropIn 0.5s ease-out forwards;
}

/* Backdrop exit */
@keyframes welcomeBackdropOut {
    0% {
        opacity: 1;
        backdrop-filter: blur(12px);
    }
    100% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.welcome-backdrop-exit {
    animation: welcomeBackdropOut 0.3s ease-in forwards;
}

/* Shimmer effect for decorative elements */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.welcome-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* Glow text animation for Mificheskaya Politika */
@keyframes glow-text {
    0%, 100% {
        text-shadow: 0 0 5px rgba(251, 191, 36, 0.5), 0 0 10px rgba(251, 191, 36, 0.3), 0 0 15px rgba(251, 191, 36, 0.2);
    }
    50% {
        text-shadow: 0 0 10px rgba(251, 191, 36, 0.8), 0 0 20px rgba(251, 191, 36, 0.6), 0 0 30px rgba(251, 191, 36, 0.4), 0 0 40px rgba(251, 191, 36, 0.2);
    }
}

.animate-glow-text {
    animation: glow-text 2s ease-in-out infinite;
}
