* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: white;
    padding: 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}



.nav-button {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 4px;
    margin-left: 1rem;
    display: inline-block;
    background-color: #333;
    color: white;
    transition: all 0.3s ease;
}




main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.content-container {
    max-width: 1800px;
    margin: 1rem auto;
    padding: 0 1rem;
}

/* Ana sayfa video grid düzeni */
.video-grid-container {
    margin: 0 auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

/* Video izleme sayfası düzeni */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

.primary-content {
    width: 100%;
    min-width: 0; /* Flexbox için önemli */
}

.video-player-large {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #000;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.video-player-large video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
}

.video-info-large {
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
}

.video-info-large h1 {
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.video-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.video-description {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Yan panel video listesi */
.secondary-content {
    width: 100%;
}

.secondary-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.side-video-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-video-item {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.side-video-item:hover {
    background-color: #f0f0f0;
}

.side-video-thumbnail {
    position: relative;
    width: 168px;
    height: 126px; /* 4:3 aspect ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.side-video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
    max-height: 100%;
}

.side-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-video-info {
    padding: 0.25rem;
}

.side-video-info h4 {
    font-size: 0.9rem;
    margin: 0;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-video-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.no-videos {
    text-align: center;
    padding: 3rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 2rem 0;
}

.no-videos h2 {
    color: #666;
    margin-bottom: 1rem;
}

.no-videos p {
    color: #888;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px 16px;
    padding: 24px 16px;
    margin: 0 auto;
    max-width: 1850px;
}

@media (min-width: 1850px) {
    .video-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1400px) and (max-width: 1849px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1100px) and (max-width: 1399px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 800px) and (max-width: 1099px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 580px) and (max-width: 799px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 579px) {
    .video-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

.video-meta-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-thumbnail video {
    transform: scale(1.01);
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    max-width: 100%;
}

.video-info {
    padding: 1rem;
}

.video-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.video-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.video-desc {
    color: #555;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Login Form Styles */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #333;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #444;
}

/* Video Upload Form Styles */
.upload-container {
    max-width: 600px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-header {
    margin-bottom: 10px;
}

.video-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.video-header small {
    color: #666;
    display: block;
    margin-top: 5px;
}

.video-container {
    margin: 10px 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: #000;
}

.video-description {
    color: #555;
    margin: 10px 0;
    line-height: 1.4;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.success-message {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    display: none;
}

.video-list {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

/* Footer Styles */
footer {
    background-color: #333;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-section {
    flex: 1;
    margin: 0 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .watch-layout {
        grid-template-columns: 1fr 280px;
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .watch-layout {
        display: block;
    }
    
    .secondary-content {
        margin-top: 2rem;
    }
    
    .side-video-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1rem;
    }
    
    .side-video-item {
        grid-template-columns: 168px 1fr;
    }
}

@media (max-width: 768px) {
    .content-container {
        padding: 0 0.5rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 0.75rem;
    }
    
    .video-player-large {
        margin-bottom: 0.5rem;
    }
    
    .side-video-item {
        grid-template-columns: 120px 1fr;
    }
    
    .side-video-thumbnail {
        width: 120px;
        height: 90px; /* 4:3 aspect ratio */
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-button {
        margin: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .content-container {
        padding: 0 0.25rem;
    }
    
    .side-video-list {
        grid-template-columns: 1fr;
    }
    
    .video-info h3 {
        font-size: 1rem;
    }
    
    .video-desc {
        font-size: 0.9rem;
    }
}

/* Video container için ek responsive kurallar */
.video-grid-container {
    max-width: 100%;
    overflow-x: hidden;
}

.video-card {
    max-width: 100%;
    overflow: hidden;
}

.video-thumbnail {
    max-width: 100%;
    overflow: hidden;
}

/* Ana video oynatıcı için ek kurallar */
.primary-content {
    max-width: 100%;
    overflow: hidden;
}

.video-info-large {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.buttonana {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    margin: 0.5rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.buttonana:hover {
    background-color: #333;
    color: white;
}

/* Video Thumbnail Stilleri */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail-img {
    width: 100%;
    height: 240px; /* 4:3 aspect ratio için */
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.video-thumbnail-img:hover {
    transform: scale(1.05);
}

.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail-container:hover .play-button-overlay {
    opacity: 1;
}

.play-button {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: white;
    transform: scale(1.1);
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Video Modal Stilleri */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.video-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-content video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Video Upload Grid Düzenlemesi */
.video-grid .video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.video-grid .video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-item .video-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.video-item .video-header h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.video-item .video-header small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.video-item .video-description {
    padding: 1rem;
    color: #555;
    line-height: 1.4;
    border-bottom: 1px solid #eee;
}

.video-item .button-group {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.buttonlog {
    text-decoration: none;
    color: white;
}