/**
 * ministv - Stil Dosyası
 * Pastel Renk Paleti
 */

:root {
    --color-primary: #8EC9FF;      /* Pastel Mavi */
    --color-secondary: #FFE28A;   /* Pastel Sarı */
    --color-accent: #FFA9C8;      /* Pastel Pembe */
    --color-neutral: #F5F5F5;     /* Açık Gri */
    --color-mint: #A8F5CC;        /* Soft Mint Yeşili */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-white: #FFFFFF;
    --color-error: #ff6b6b;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-neutral);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Sayfası */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-mint) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--color-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: var(--color-primary);
    font-size: 2.5em;
    margin-bottom: 10px;
}

.logo p {
    color: var(--color-text-light);
    font-size: 0.9em;
}

/* Form Elemanları */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 500;
}

.form-group label span {
    display: inline;
    font-weight: normal;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-neutral);
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Butonlar */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    width: 100%;
}

.btn-primary:hover {
    background: #7BB8FF;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--color-text-light);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: #555;
}

.btn-register {
    background: var(--color-secondary);
    color: var(--color-text);
    width: 50%;
}

.btn-register:hover {
    background: #FFD966;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-actions .btn-primary {
    width: 100%;
}

.form-actions .btn-register {
    width: 50%;
    margin-left: auto;
    margin-top: 8px;
}

.form-actions .btn-secondary {
    width: 50%;
    margin-left: auto;
    margin-top: 8px;
}

.btn-forgot-password {
    background: linear-gradient(135deg, #FFA9C8 0%, #FFE28A 100%);
    color: #333;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9em;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 169, 200, 0.3);
    border: 2px solid transparent;
}

.btn-forgot-password::before {
    content: '🔑 ';
    font-size: 0.9em;
}

.btn-forgot-password:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 169, 200, 0.4);
    background: linear-gradient(135deg, #FF9BB8 0%, #FFD966 100%);
}

.btn-forgot-password:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 169, 200, 0.3);
}

.btn-icon {
    background: transparent;
    padding: 8px;
    color: var(--color-text);
}

/* Alert */
.alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.alert-error {
    background: #ffe0e0;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Header */
.header {
    background: var(--color-white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lock-indicator {
    color: var(--color-primary);
    font-weight: 600;
}

/* Çocuk Profilleri */
.children-section h2 {
    margin-bottom: 20px;
    color: var(--color-text);
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.child-card {
    background: var(--color-white);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.child-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.child-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    font-weight: bold;
    margin: 0 auto 15px;
}

.child-avatar.large {
    width: 120px;
    height: 120px;
    font-size: 3em;
}

.child-card h3 {
    margin-bottom: 10px;
    color: var(--color-text);
}

.child-card .time-info {
    font-size: 0.85em;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.child-card-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.child-card .btn {
    width: auto;
    padding: 8px 20px;
}

.btn-sm {
    padding: 6px 15px;
    font-size: 0.9em;
}

/* Yönetim Modu */
.management-mode {
    max-width: 1400px;
    margin: 0 auto;
}

.management-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.section {
    background: var(--color-white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.section h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--color-primary);
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header-with-action h2 {
    margin-bottom: 0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
    border-radius: 6px;
}

.section-half {
    margin-bottom: 0;
}

.section-third {
    margin-bottom: 0;
}

.children-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.child-management-card {
    background: var(--color-neutral);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
}

.child-management-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.child-management-card .child-avatar {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
}

.child-management-card h3 {
    margin-bottom: 10px;
    color: var(--color-text);
}

.child-management-card .time-info {
    font-size: 0.9em;
    color: var(--color-text-light);
    margin-bottom: 15px;
}

.child-management-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.child-management-card .btn {
    width: 100%;
}

.child-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-error);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.child-delete-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.child-delete-btn:active {
    transform: scale(0.95);
}

.btn-block {
    display: block;
    width: 100%;
}

/* section h2 zaten yukarıda tanımlı */

.form-card {
    background: var(--color-neutral);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.form-card h3 {
    margin-bottom: 15px;
}

/* Video Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Kompakt Video Grid (3 kolonlu layout için) */
.videos-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.video-card {
    background: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    position: relative;
}

.video-card:hover {
    transform: translateY(-3px);
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.videos-grid-compact .video-thumbnail-wrapper {
    height: 100px;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-actions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-card:hover .video-actions {
    opacity: 1;
    pointer-events: auto;
}

.video-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.8em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.video-add-btn {
    background: var(--color-mint);
}

.video-add-btn:hover {
    background: #8dd4b8;
    transform: scale(1.1);
}

.video-remove-btn {
    background: #ff6b6b;
}

.video-remove-btn:hover {
    background: #ff5252;
    transform: scale(1.1);
}

.video-delete-btn {
    background: #dc3545;
}

.video-delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Video Profil Badge */
.video-profiles-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 10;
    pointer-events: none;
    max-height: 60px;
    overflow-y: auto;
}

.profile-badge {
    background: rgba(142, 201, 255, 0.95);
    backdrop-filter: blur(5px);
    color: var(--color-text);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7em;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-hint {
    color: var(--color-text-light);
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
}

/* Çocuk Video İzleme */
.child-view {
    background: var(--color-neutral);
    min-height: 100vh;
}

.child-header {
    background: var(--color-white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.child-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

/* Video Overlay - YouTube logo ve tıklamaları engellemek için */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    pointer-events: auto;
    cursor: default;
}

/* Üst kısım (YouTube logo alanı) - engelle */
.video-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: transparent;
    pointer-events: auto;
    z-index: 11;
}

/* Alt kısım (Youtube'da izle butonu) - engelle */
.video-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: transparent;
    pointer-events: auto;
    z-index: 11;
}

/* Tam Ekran Butonu */
.fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(142, 201, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-wrapper:hover .fullscreen-btn {
    opacity: 1;
    transform: scale(1);
}

/* Mobil cihazlarda buton her zaman görünür olsun */
@media (hover: none) and (pointer: coarse) {
    .fullscreen-btn {
        opacity: 0.8;
        transform: scale(0.9);
    }
    
    .video-wrapper:active .fullscreen-btn,
    .fullscreen-btn:active {
        opacity: 1;
        transform: scale(1);
    }
}

.fullscreen-btn:hover {
    background: rgba(142, 201, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Mobil dokunma desteği */
.fullscreen-btn:active {
    background: rgba(142, 201, 255, 1);
    transform: scale(0.95);
}

.fullscreen-icon {
    font-size: 24px;
    color: var(--color-white);
    font-weight: bold;
    line-height: 1;
}

/* Tam ekran modunda buton stilleri */
.video-wrapper:fullscreen .fullscreen-btn,
.video-wrapper:-webkit-full-screen .fullscreen-btn,
.video-wrapper:-moz-full-screen .fullscreen-btn,
.video-wrapper:-ms-fullscreen .fullscreen-btn {
    bottom: 30px;
    right: 30px;
    opacity: 1 !important;
    transform: scale(1) !important;
}

/* Tam ekran modunda video wrapper */
.video-wrapper:fullscreen,
.video-wrapper:-webkit-full-screen,
.video-wrapper:-moz-full-screen,
.video-wrapper:-ms-fullscreen {
    padding-bottom: 0;
    height: 100vh;
    border-radius: 0;
}

.video-title {
    margin-top: 20px;
    color: var(--color-text);
}

.video-playlist {
    background: var(--color-white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    max-height: 80vh;
    overflow-y: auto;
}

.video-playlist h3 {
    margin-bottom: 15px;
    color: var(--color-primary);
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.playlist-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.playlist-item:hover {
    background: var(--color-neutral);
}

.playlist-item.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.playlist-thumbnail {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
}

.playlist-info h4 {
    font-size: 0.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-white);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Profile List */
.profile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--color-neutral);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 0;
    width: 100%;
}

.profile-item:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateX(5px);
}

.profile-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-icon {
    flex-shrink: 0;
}

.profile-icon {
    font-size: 1.5em;
}

.profile-name {
    font-weight: 600;
    font-size: 1.1em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
}

.empty-state h2 {
    margin-bottom: 10px;
    color: var(--color-text);
}

/* Back Link */
.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--color-text-light);
    text-decoration: none;
}

.back-link:hover {
    color: var(--color-primary);
}

/* Time Remaining */
.time-remaining {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: var(--color-mint);
    border-radius: 20px;
    font-weight: 600;
    color: var(--color-text);
}

.time-icon {
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 1200px) {
    .management-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .video-layout {
        grid-template-columns: 1fr;
    }
    
    .children-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .management-top {
        grid-template-columns: 1fr;
    }
    
    .children-management-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

