:root {
    --dark-bg: #0f172a;
    --accent: #2dd4bf;
    --text: #e2e8f0;
    --card-bg: #1e293b;
    --gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 1.125rem;
    line-height: 1.7;
    background: var(--dark-bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.header {
    background: var(--gradient);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 200px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: sway 3s infinite ease-in-out;
}

@keyframes sway {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* НОВЫЙ */
.btn-common {
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.1);
    color: var(--text);
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}

/* НОВЫЙ */
.btn-common:hover {
    transform: scale(1.05);
    background: var(--accent);
    box-shadow: 0 0 15px rgba(45,212,191,0.5);
}

/* НОВЫЙ */
.nav-btn {
    position: relative;
    overflow: hidden;
}

/* НОВЫЙ */
.nav-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(45,212,191,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

/* НОВЫЙ */
.nav-btn:hover::after {
    width: 200%;
    height: 200%;
}

/* НОВЫЙ */
.login-form button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}


section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    min-height: auto;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    animation: fadeIn 0.8s ease-in;
}

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

.research-data {
    padding: 1.5rem;
    background: var(--dark-bg);
    border-left: 4px solid var(--accent);
    margin: 1.5rem 0;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.research-data:hover {
    transform: translateX(5px);
}

ul, ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

li {
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

li:hover {
    color: var(--accent);
}

footer {
    background: var(--gradient);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 4rem;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
}

.hero-section {
    padding: 4rem 2rem;
    background: var(--gradient);
    text-align: center;
    border-bottom: 3px solid var(--accent);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(45,212,191,0.1) 0%, transparent 70%);
    animation: rotateGlow 15s infinite linear;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: slideUp 1s ease-out;
}

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

.slogan {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: bold;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(45,212,191,0.3);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; text-shadow: 0 0 10px rgba(45,212,191,0.7); }
    100% { transform: scale(1); opacity: 0.8; }
}

.certificate-block {
    padding: 1rem;
}

.certificate-content {
    display: block;
}

.standard-image {
    float: right;
    width: 30%;
    max-width: 300px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    margin: 0 0 2rem 2rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.standard-image:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.grid-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.grid-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--accent);
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-item-image {
    transform: scale(1.03);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--dark-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

table:hover {
    box-shadow: 0 0 15px rgba(45,212,191,0.3);
}

th, td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--accent);
}

th {
    background-color: var(--accent);
    color: var(--dark-bg);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: rgba(255,255,255,0.05);
}

tr:hover {
    background-color: rgba(45,212,191,0.1);
}

.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid var(--accent);
    margin: 2rem 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.text-content {
    width: 60%;
    max-width: 60%;
    padding-right: 2rem;
    position: relative;
}

.text-content h3 {
    position: relative;
    padding-left: 2.5rem;
}

.text-content h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent);
    animation: pulseDot 1.5s infinite;
}

.history-timeline-image {
    width: 40%;
    max-width: 500px;
    border-radius: 12px;
    border: 2px solid var(--accent);
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.history-timeline-image:hover {
    transform: scale(1.05);
}

@keyframes pulseDot {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column;
    }

    .text-content {
        width: 100%;
        max-width: 100%;
        padding-right: 0;
    }

    .history-timeline-image {
        width: 100%;
        margin-top: 1rem;
    }
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.login-form input {
    padding: 0.75rem;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: var(--dark-bg);
    color: var(--text);
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #4af0d9;
    box-shadow: 0 0 10px rgba(45,212,191,0.5);
    transform: scale(1.02);
}

.login-form-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}





.login-form button:active {
    transform: scale(0.95);
}

.login-form button:disabled {
    background: rgba(255,255,255,0.05);
    cursor: not-allowed;
    opacity: 0.5;
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--dark-bg);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    text-align: center;
    display: none;
    animation: fadeIn 0.5s ease;
}

.message.show {
    display: block;
}

.loader {
    display: none;
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

.loader.show {
    display: block;
}

.loader--small {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .certificate-content {
        display: block;
    }

    .section {
        padding: 1.5rem;
    }

    .standard-image,
    .history-timeline-image {
        width: 100%;
        margin: 1rem -0.25rem;
    }

    .grid-section,
    .grid-section-2x2,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .login-form {
        max-width: 100%;
    }

    .login-form-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-btn:hover,
    .grid-item:hover,
    .standard-image:hover,
    .history-timeline-image:hover {
        transform: none;
        box-shadow: none;
    }

    .standard-image {
        float: none;
        display: block;
        margin: 0 auto 2rem;
        width: 80%;
    }

    table {
        width: 100%;
        overflow-x: auto;
        display: block;
    }

    .reviews-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }

    .review-item {
        margin-bottom: 1.5rem;
    }

    .review-image {
        width: 100%;
        height: auto;
    }
}

.grid-section-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

.caption {
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 500;
    text-align: center;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.video-item {
    width: 100%;
    border-radius: 12px;
    border: 2px solid var(--accent);
    background: var(--dark-bg);
    transition: transform 0.3s ease;
}

.video-item:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .grid-section-2x2 {
        grid-template-columns: 1fr;
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.review-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-item:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.review-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.review-item:hover .review-image {
    transform: scale(1.1);
}

.review-name {
    color: var(--accent);
    margin: 0.5rem 0;
    font-size: 1.25rem;
}

.review-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .reviews-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;
    }
}

.caption h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.cat-description {
    color: #cbd5e1;
    font-size: 0.95em;
    line-height: 1.7;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
    margin: 0.8rem 0;
}

.cat-fact {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9em;
}

.video-manifest {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    margin-top: 2rem;
}

.video-manifest h3 {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.video-card {
    position: relative;
    margin-bottom: 2rem;
}

.video-caption {
    padding: 0.8rem;
    background: rgba(45, 212, 191, 0.1);
    border-radius: 0 0 8px 8px;
    font-size: 0.9em;
    color: #94a3b8;
}

.video-caption em {
    color: #cbd5e1;
    font-style: normal;
}

.research-data strong {
    color: var(--accent);
}

.cats-page .grid-item-image {
    height: auto;
    aspect-ratio: 1/1;
    object-position: center;
}

@media (max-width: 768px) {
    .cats-page .grid-item-image {
        height: auto;
    }
}
@media (max-width: 768px) {
    .history-section {
        display: block !important;
    }
}