:root {
    --bg-light: #f4f4f4;
    --bg-dark: #121212;
    --text-light: #000;
    --text-dark: #fff;
    --card-light: #fff;
    --card-dark: #1e1e1e;
    --border-light: #ccc;
    --border-dark: #444;
}

body {
    
    font-weight: 700;
    margin: 0;
}

body.light {
    background-color: var(--bg-light) !important;
    color: var(--text-light);
}

body.dark {
    background-color: var(--bg-dark) !important;
    color: var(--text-dark);
}

body.light .sticky-top {
    background-color: var(--bg-light) !important;
}

body.dark .sticky-top {
    background-color: var(--bg-dark) !important;
}

.theme-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-switch .theme-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switch input[type="checkbox"] {
    width: 40px;
    height: 20px;
    appearance: none;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

.theme-switch input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 1px;
    left: 1px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.theme-switch input[type="checkbox"]:checked {
    background: #4caf50;
}

.theme-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.view-toggle .btn {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    padding: 0.3rem;
    transition: color 0.3s;
}

body.light .view-toggle .btn.active {
    color: #0d6efd;
}
body.light .view-toggle .btn {
    color: #000;
}
body.dark .view-toggle .btn.active {
    color: #4dabf7;
}
body.dark .view-toggle .btn {
    color: #ccc;
}

#cardContainer.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

#cardContainer.list-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

#cardContainer.table-view {
    display: block;
    margin-top: 1rem;
}

a.card {
    background: var(--card-light);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    color: inherit;
    text-decoration: none;
    display: block;
}

body.dark a.card {
    background: var(--card-dark);
    border-color: var(--border-dark);
}

body.light a.card:hover {
    transform: translateY(-6px);
    border-color: #0d6efd;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark a.card:hover {
    transform: translateY(-6px);
    border-color: #4dabf7;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

.card.grid-view {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card.list-view {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
}

.card.table-view {
    display: table-row;
}

.card img {
    width: 100%;
    object-fit: cover;
}

.card.list-view img {
    width: 150px;
    height: auto;
    flex-shrink: 0;
}

.card .info {
    padding: 0.75rem;
}

.card.list-view .info {
    padding: 0.75rem;
}

.card.table-view .info {
    display: table-cell;
    padding: 0.75rem;
    vertical-align: top;
}

.title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

table.movie-table {
    width: 100%;
    border-collapse: collapse;
}

table.movie-table th,
table.movie-table td {
    border: 1px solid #ccc;
    padding: 0.5rem;
}

.card.skeleton {
    background: #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    animation: pulse 1.2s infinite ease-in-out;
}
.skeleton-img {
    width: 100%;
    height: 200px;
    background: #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}
.skeleton-text {
    height: 14px;
    background: #ccc;
    border-radius: 4px;
    margin: 5px 0;
}
.skeleton-text.title {
    width: 60%;
    height: 18px;
}
.skeleton-text.line.short {
    width: 40%;
}
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
    }
}

#movieCount {
    opacity: 0.7;
    font-size: 0.95em;
    margin-top: 0.5rem;
    color: var(--text-light);
}
body.dark #movieCount {
    color: #fff;
    font-weight: 500;
}
/* Социальные иконки */
.social-icon img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 25%;
    padding: 1px;
}

.social-icon img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
