/* Base styles */
:root {
    /* Light Mode Colors */
    --text-color: #333;
    --bg-color: #f5f5f7;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --highlight-bg: #44c767;
    --highlight-hover: #32a852;
    --navbar-bg: #333333;
    --navbar-text: #ffffff;
    --navbar-hover: #555555;
    --section-title: #2c3e50;
    --link-color: #2a9d8f;
    --footer-bg: #333333;
    --footer-text: #ffffff;
    --border-color: #e0e0e0;
    --transition-speed: 0.3s;
    --accent-color: #44c767;
}

.dark-mode {
    /* Dark Mode Colors */
    --text-color: #e1e1e1;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --highlight-bg: #44c767;
    --highlight-hover: #57dd7c;
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
    --navbar-hover: #333333;
    --section-title: #f0f0f0;
    --link-color: #4ad0c0;
    --footer-bg: #000000;
    --footer-text: #cccccc;
    --border-color: #333333;
    --accent-color: #44c767;
}

/* General styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

/* Page transitions */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.page-loaded {
    opacity: 1;
}

/* Navigation */
.navbar {
    background-color: var(--navbar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-button {
    background-color: transparent;
    border: none;
    color: var(--navbar-text);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    margin: 0 10px;
    text-align: center;
    transition: all var(--transition-speed);
    position: relative;
}

.nav-button:hover {
    color: var(--accent-color);
}

.nav-controls {
    display: flex;
    align-items: center;
}

.control-button {
    background-color: transparent;
    border: none;
    color: var(--navbar-text);
    cursor: pointer;
    margin-left: 15px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-button i {
    font-size: 18px;
}

.control-button:hover {
    background-color: var(--navbar-hover);
}

.control-button:hover i {
    color: var(--accent-color);
}

/* Section titles and headers */
.name-info {
    margin: 40px 20px 20px;
    text-align: center;
    animation: fadeIn 1s ease forwards;
}

.name {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--section-title);
}

.section-title {
    font-size: 34px;
    margin: 30px 0 20px;
    color: var(--section-title);
    text-align: center;
    position: relative;
    font-weight: 600;
}

/* Video grid */
.video-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    margin: 0 auto;
    max-width: 1600px;
    animation: fadeInUp 1s ease forwards;
}

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

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

.video-block {
    width: calc(33.333% - 40px);
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    border: 1px solid var(--border-color);
    opacity: 0; /* Початково прозорий, JS встановить opacity на 1 */
    display: flex;
    flex-direction: column;
    min-height: 280px; /* Мінімальна висота для уніфікації */
}

.video-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px var(--card-shadow);
    border-color: var(--accent-color);
}

.video {
    width: 100%;
    height: 200px;
    border: none;
}

.video-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 15px 0px 15px;
    border-bottom: 1px solid var(--border-color);
    min-height: 55px; /* Фіксована висота для вирівнювання */
}

/* Видаляємо ту синю риску, яка є в посиланні GitHub */
.video-info a {
    text-decoration: none;
    display: inline-block;
}

.video-title {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
    color: var(--section-title);
}

.compani-info {
    padding: 15px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: auto; /* Забезпечує, що інформація про компанію завжди знаходиться внизу блоку */
    height: 30px; /* Фіксована висота для контейнера з назвою компанії */
    display: flex;
    align-items: center;
}

/* Buttons */
.play-button, .git-button {
    background-color: transparent;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    background-color: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.play-button i, .git-button i {
    font-size: 15px;
    color: #333;
}

.dark-mode .play-button i, 
.dark-mode .git-button i {
    color: #eee;
}

.play-button:hover, .git-button:hover {
    transform: scale(1.1);
    background-color: rgba(68, 199, 103, 0.2);
}

.play-button:hover i, .git-button:hover i {
    color: var(--accent-color);
}

/* Resume page */
.container {
    display: flex;
    flex-wrap: wrap;
    margin: 30px auto;
    max-width: 1200px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 6px 15px var(--card-shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: fadeInUp 1s ease forwards;
}

.left-section, .right-section {
    padding: 40px;
}

.left-section {
    flex: 1 1 60%;
    border-right: 1px solid var(--border-color);
}

.right-section {
    flex: 1 1 40%;
    background-color: rgba(68, 199, 103, 0.05);
    display: flex;
    flex-direction: column;
}

.right-section h2 {
    margin-top: 0; /* Видаляємо верхній відступ для заголовка в правій колонці */
}

.dark-mode .right-section {
    background-color: rgba(68, 199, 103, 0.1);
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--section-title);
}

h1 {
    font-size: 34px;
    margin-top: 0;
    font-weight: 600;
}

h2 {
    font-size: 26px;
    margin-top: 30px;
    position: relative;
    font-weight: 500;
}

h3 {
    font-size: 20px;
    margin-top: 25px;
    font-weight: 500;
}

ul, ol {
    margin: 15px 0 25px 25px;
}

li {
    margin-bottom: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.highlighted-text {
    background-color: var(--highlight-bg);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.highlighted-text:hover {
    transform: translateY(-3px);
    background-color: var(--highlight-hover);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    animation: fadeIn 1s ease forwards;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}