:root {
    --bg-primary: #e8e2d9;

    --bg-secondary: #dcd4c9;
    --bg-card: #f5f2ed;

    --bg-navbar: #f5f2ed;
    --bg-footer: #f9f3e863;

    --text-primary: #1a1614;
    --text-secondary: #453e3a;
    --text-muted: #6d645e;

    --accent-color: #f98652;
    --accent-gradient: linear-gradient(135deg, #f98652 0%, #d84315 100%);
    --accent-highlight: #ffccbc;
    --accent-hover: rgba(216, 67, 21, 0.15);

    --border-color: rgba(0, 0, 0, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.12);
    --shadow-hover: rgba(249, 134, 82, 0.3);

    --floating-gradient: radial-gradient(circle, rgba(249, 134, 82, 0.08) 0%, transparent 70%);
}

[data-theme="dark"] {
    /* Dark Theme: Warm Charcoal (No Redness) */
    --bg-primary: #1c1917;
    /* Warm Black */
    --bg-secondary: #292524;
    /* Warm Dark Grey */
    --bg-card: rgba(41, 37, 36, 0.85);
    --bg-navbar: rgba(28, 25, 23, 0.95);
    --bg-footer: #1c1917;

    --text-primary: #e7e5e4;
    /* Warm White */
    --text-secondary: #a8a29e;
    /* Warm Light Grey */
    --text-muted: #78716c;
    /* Warm Grey */

    --accent-gradient: linear-gradient(135deg, #f98652 0%, #a5343a 100%);
    --accent-highlight: #fffca0;
    --accent-color: #f98652;
    --accent-hover: rgba(249, 134, 82, 0.15);

    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(249, 134, 82, 0.15);

    --floating-gradient: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

.content {
    flex: 1 0 auto;
    padding-top: 140px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 30px;
    padding-right: 30px;
}

/* Theme Transition Overlay */
.theme-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    mix-blend-mode: normal;
    pointer-events: none;
}

.theme-transition-overlay.active {
    animation: themeExpand 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes themeExpand {
    0% {
        opacity: 0.3;
        clip-path: circle(0% at var(--x) var(--y));
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0;
        clip-path: circle(150% at var(--x) var(--y));
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 90%;
    max-width: 1100px;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.navbar.hidden {
    transform: translateX(-50%) translateY(-120px);
    opacity: 0;
}

.navbar.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-logo {
    height: 48px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 126, 95, 0.3));
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(255, 126, 95, 0.5));
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    background: var(--accent-hover);
    color: var(--accent-color);
}

.nav-links a.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.cabinet-btn {
    margin-left: auto;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(249, 134, 82, 0.1);
    border: 1px solid var(--accent-color);
}

.cabinet-btn:hover {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--shadow-hover);
    transform: translateY(-2px);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--accent-gradient);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px var(--accent-hover);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
}

.sun-icon,
.moon-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    color: white;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    font-size: 72px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* About Section */
/* About Section */
.about-section {
    margin: 60px 0;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.about-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
    /* Робить обидві картки однакової висоти */
}

.about-card,
.about-image-card {
    flex: 1;
    /* Розділяє простір 50/50 */
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-card {
    padding: 50px;
    text-align: left;
    /* Змінив на ліворуч для кращого вигляду в парі */
}

.about-image-card {
    position: relative;
    overflow: hidden;
    /* Щоб картинка не вилазила за радіус кутів */
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Картинка заповнює контейнер без деформації */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ефекти наведення для обох карток */
.about-card:hover,
.about-image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px var(--shadow-hover);
    border-color: var(--accent-color);
}

.about-image-card:hover .about-img {
    transform: scale(1.15);
    /* Легкий зум картинки */
}

.about-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.about-card h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-card p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Адаптивність для планшетів та телефонів */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        /* Складаємо один під одного */
    }

    .about-image-card {
        height: 300px;
        /* Фіксована висота для картинки на мобільних */
    }

    .about-card {
        text-align: center;
        padding: 35px 25px;
    }
}

/* Server Info */
.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 60px 0;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 35px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px var(--shadow-hover);
    border-color: var(--accent-color);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.info-icon {
    font-size: 32px;
}

.info-header h3 {
    font-size: 24px;
    color: var(--text-primary);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

code {
    background: var(--bg-primary);
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: var(--text-primary);
    border: 1px dashed var(--border-color);
    transition: all 0.3s ease;
}

code.copy-text {
    cursor: pointer;
    position: relative;
}

code.copy-text:hover {
    background: var(--accent-hover);
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

code.copy-text:active {
    transform: scale(0.98);
}

/* Team Section */
.team-section {
    margin: 80px 0;
}

.section-title {
    font-size: 42px;
    text-align: center;
    margin-bottom: 60px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.team-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.team-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 64px;
    flex: 1;
    min-width: 250px;
}

.team-category {
    flex: 1;
    min-width: 250px;
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.category-icon {
    font-size: 20px;
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.team-card {
    flex: 1 0 auto;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-hover);
    border-color: var(--accent-color);
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.member-avatar.has-image {
    background: transparent;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    flex: 1;
}

.member-info h4 {
    font-size: 16px;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.member-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Info Section */
.info-section {
    margin: 80px 0 100px;
    animation: fadeInUp 0.8s ease-out 0.9s backwards;
}

.info-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.info-block {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--shadow-hover);
}

.block-title {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 15px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: var(--accent-hover);
    color: var(--accent-color);
}

/* Footer */
.footer {
    flex-shrink: 0;
    background: var(--bg-footer);
    color: var(--text-secondary);
    padding: 30px 0 0;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}



.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px 20px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-column-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.footer-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    position: relative;
    width: fit-content;
}

.footer-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color);
    transform: translateX(3px);
}

.footer-link:hover::before {
    width: 100%;
}

.footer-link.disabled {
    color: var(--text-muted);
    opacity: 0.5;
    cursor: default;
}

.footer-link.disabled:hover {
    color: var(--text-muted);
    transform: none;
}

.footer-link.disabled::before {
    display: none;
}

.footer-bottom {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 30px;
}

.footer-logo {
    width: 60px;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(249, 134, 82, 0.3));
}

.footer-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 3px 10px rgba(249, 134, 82, 0.5));
}

.footer-text-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-text-content p {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

.footer-disclaimer {
    opacity: 0.7;
    font-size: 10px;
}

.footer-icon {
    display: inline-block;
    width: 16px;
    text-align: center;
    margin-right: 6px;
    font-style: normal;
    color: var(--text-primary);
    opacity: 0.9;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 576px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-column {
        text-align: center;
        align-items: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


/* Member Modal */
.member-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* --- Info Dashboard Styles --- */
.info-dashboard {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 48px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.input-section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

/* Status Card */
/* Status Card */
.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
}

.status-indicator {
    position: relative;
    width: 24px;
    height: 24px;
    margin-bottom: 10px;
}

.status-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #ffeb3b;
    /* Default Loading Yellow */
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 235, 59, 0.5);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 2px solid #ffeb3b;
    /* Default Loading Yellow */
    border-radius: 50%;
    animation: pulse-status 2s infinite;
    opacity: 0;
}

@keyframes pulse-status {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.status-content h2 {
    font-size: 24px;
    /* Reduced from 32px */
    color: var(--text-primary);
    margin-bottom: 20px;
    /* Increased spacing slightly */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.status-details {
    display: flex;
    gap: 30px;
    /* Reduced gap */
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 20px;
    /* Reduced from 24px */
    font-weight: 800;
    color: var(--accent-color);
}

.stat-value.copy-ip {
    cursor: pointer;
    text-decoration: none;
    background: var(--bg-primary);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.stat-value.copy-ip:hover {
    background: var(--accent-hover);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-bg-icon {
    position: absolute;
    right: -20px;
    bottom: -40px;
    font-size: 180px;
    opacity: 0.03;
    transform: rotate(-15deg);
    pointer-events: none;
    /* Critical for clickthrough */
}

/* Map Card */
.map-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.map-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px var(--shadow-hover);
    border-color: var(--accent-color);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.map-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
}

.map-link-btn {
    text-decoration: none;
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
}

.map-link-btn:hover {
    background: var(--accent-color);
    color: white;
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: #000;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .map-container {
        height: 350px;
    }
}

/* Social Grid */
.social-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .social-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.social-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
    /* Prevents flex items from overflowing */
}

.social-card:hover {
    transform: translateY(-5px);
    background: var(--bg-primary);
    /* Slight brighten */
    border-color: var(--accent-color);
}

.social-icon img {
    width: 48px;
    height: 48px;
    transition: transform 0.3s ease;
}

.social-card:hover .social-icon img {
    transform: scale(1.1) rotate(5deg);
}

.social-text h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-text p {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-arrow {
    margin-left: auto;
    font-size: 20px;
    color: var(--accent-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.social-card:hover .social-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Resources Grid */
/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

@media (min-width: 768px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resources-grid .resource-card:last-child {
        grid-column: span 2;
        /* Center the last item on tablet if 3 items */
    }
}

@media (min-width: 1024px) {
    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .resources-grid .resource-card:last-child {
        grid-column: span 1;
    }
}

.resource-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    /* Ensure clickable above decorations */
}

.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.resource-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: var(--bg-primary);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: inset 0 0 20px var(--shadow-color);
}

.resource-content h4 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.resource-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.resource-btn {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    /* Simple default */
    color: var(--text-primary);
    /* Simple text */
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 20;
    /* distinct z-index for buttons */
    cursor: pointer;
    box-shadow: none;
}

.resource-btn:hover {
    background: var(--accent-gradient);
    /* Premium on hover */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-hover);
    border-color: transparent;
}

/* Remove specific override since base is now gradient */
/* Remove specific override since base is now gradient */
/* .resource-card.donate .resource-btn removed as it was empty */

.resource-card.donate .resource-btn:hover {
    box-shadow: 0 5px 20px var(--accent-hover);
}

/* Roadmap Grid */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.roadmap-item {
    background: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 16px;
    border: 1px dashed var(--border-color);
}

[data-theme="dark"] .roadmap-item {
    background: rgba(0, 0, 0, 0.2);
}

.roadmap-status {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--accent-hover);
    color: var(--accent-color);
    margin-bottom: 10px;
}

.roadmap-item h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.roadmap-item p {
    font-size: 13px;
    color: var(--text-muted);
}

.member-modal.active {
    display: flex;
    /* animation handled by children for better control */
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 0;
    /* Removed padding to let children handle it */
    max-width: 800px;
    /* Increased from 600px */
    width: 90%;
    border: 0px solid var(--accent-color);
    /* Added orange border */
    box-shadow: 0 20px 60px var(--shadow-color);
    opacity: 0;
    animation: modalPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
    overflow: hidden;
}

.member-modal.active .modal-content {
    box-shadow: 0 0 0 1px var(--accent-color),
        0 0 40px rgba(249, 134, 82, 0.4),
        0 20px 60px var(--shadow-color);
}

.member-modal.closing .modal-content {
    animation: modalClose 0.4s cubic-bezier(0.6, 0, 0.8, 0.4) forwards;
}

.member-modal.closing .modal-overlay {
    animation: fadeOut 0.4s ease-out forwards;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-gradient);
    transform: rotate(90deg);
}

.modal-layout {
    display: flex;
    min-height: 450px;
}

.modal-skin-container {
    flex: 0 0 320px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.modal-skin-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    overflow: visible;
    position: relative;
}

.modal-skin-wrapper canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
    cursor: grab;
    transition: filter 0.3s ease;
}

.modal-skin-wrapper canvas:hover {
    filter: drop-shadow(0 20px 40px rgba(249, 134, 82, 0.3));
}

.modal-skin-wrapper canvas:active {
    cursor: grabbing;
}

/* 3D Skin Loader */
.skin-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    z-index: 5;
}

.skin-loader p {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.skin-loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(249, 134, 82, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skin Error */
.skin-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    padding: 20px;
}

.skin-error-icon {
    font-size: 48px;
    opacity: 0.7;
}

.skin-error p {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

.modal-info-container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-title h3 {
    font-size: 36px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-title p {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-bio {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 24px;
    background: rgba(121, 85, 72, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(121, 85, 72, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modal-bio {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.modal-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-self: flex-start;
}

.modal-role {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-gradient);
    border-radius: 10px;
    border: none;
    font-size: 12px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px var(--shadow-hover);
    transition: all 0.3s ease;
}

.modal-role.role-supervisor {
    background: linear-gradient(135deg, #8799ae 0%, #6692c5 100%);
}

.modal-role.role-team {
    background: linear-gradient(135deg, #9e6bff 0%, #6239ad 100%);
}

.modal-role.role-makers {
    background: linear-gradient(135deg, #ffb84e 0%, #f5910e 100%);
}

.modal-role.role-innovator {
    background: linear-gradient(135deg, #ff8d64 0%, #c1461a 100%);
}

.modal-role.role-ПершаЛеді {
    background: linear-gradient(135deg, #ebd7ff 0%, #cfa0ff 100%);
}

.modal-role:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

@media (max-width: 768px) {
    .modal-layout {
        flex-direction: column;
    }

    .modal-skin-container {
        flex: 0 0 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .modal-info-container {
        padding: 25px;
    }

    .modal-content {
        max-width: 90%;
    }

    .modal-title h3 {
        font-size: 28px;
    }
}


/* Floating Elements */
.floating-element {
    position: fixed;
    border-radius: 50%;
    background: var(--floating-gradient);
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
    transition: background 0.6s ease;
}

.floating-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.floating-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation-delay: -10s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-logo {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #fffca0 0%, #f98652 50%, #a5343a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    animation: pulse 2s infinite ease-in-out;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(165, 52, 58, 0.1);
    border-top-color: var(--accent-color);
    border-left-color: #a5343a;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.95);
    }
}

@keyframes modalPop {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.92);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes modalClose {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        filter: blur(3px);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        width: 95%;
        padding: 12px 20px;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        padding: 8px 12px;
        font-size: 13px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 16px;
    }

    .about-card {
        padding: 35px 25px;
    }

    .about-card h2 {
        font-size: 26px;
    }

    .about-card p {
        font-size: 16px;
    }

    .server-info {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 32px;
    }

    .team-container {
        flex-direction: column;
    }

    .team-grid {
        flex-direction: column;
    }

    .info-container {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        text-align: center;
    }

    .modal-content {
        padding: 30px 25px;
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
    }
}