/* === GENEL STILLER === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3b82f6 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* === CONTAINER === */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* === LOGO === */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    max-width: 360px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    display: block;
    margin: 0 auto;
}

.logo-small {
    max-width: 220px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
    display: block;
    margin: 0 auto;
}

/* === GİRİŞ KART === */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* === BAŞLIKLAR - GİRİŞ SAYFASI === */
.main-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 10px;
    text-shadow: none;
}

.subtitle {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 1rem;
    font-weight: 400;
}

/* === FORM STİLLERİ === */
.login-form {
    position: relative;
    z-index: 1;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.password-input {
    width: 100%;
    padding: 16px 50px 16px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.password-input::placeholder {
    color: #94a3b8;
}

.password-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    padding: 4px;
}

.toggle-password:hover {
    color: #1e293b;
    transform: translateY(-50%) scale(1.1);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* === HATA MESAJI === */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    font-size: 0.95rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
}

/* === GALERİ SAYFA STİLLERİ - ROMANTİK === */
.gallery-body {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
    min-height: 100vh;
}

.gallery-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 182, 193, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 192, 203, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 218, 185, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.gallery-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    backdrop-filter: blur(10px);
}

.gallery-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.music-controls {
    margin: 20px 0;
}

.music-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
    font-family: 'Poppins', sans-serif;
}

.music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.music-btn.playing {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.music-btn.playing:hover {
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* === GALERİ CONTAINER === */
.gallery-container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.no-images {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    margin-top: 100px;
}

/* === GALERİ GRID - OPTİMİZE EDİLMİŞ === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(30px);
    animation: galleryItemSlideIn 0.6s ease-out forwards;
}

/* Basit staggered animation */
.gallery-item:nth-child(1) { animation-delay: 0s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.3s; }
.gallery-item:nth-child(5) { animation-delay: 0.4s; }
.gallery-item:nth-child(6) { animation-delay: 0.5s; }
.gallery-item:nth-child(7) { animation-delay: 0.6s; }
.gallery-item:nth-child(8) { animation-delay: 0.7s; }

@keyframes galleryItemSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Basit hover efekti */
.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.gallery-image.loaded {
    opacity: 1;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, 
        rgba(255, 107, 107, 0.9) 0%, 
        rgba(255, 142, 142, 0.9) 50%, 
        rgba(231, 76, 60, 0.9) 100%);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.image-info {
    text-align: center;
}

.image-number {
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* === MODAL STİLLERİ - OPTİMİZE EDİLMİŞ === */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    text-align: center;
    transition: transform 0.3s ease;
    opacity: 0;
}

.modal.show .modal-content {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s ease, transform 0.2s ease;
}

.close:hover {
    color: #ff69b4;
    transform: scale(1.1);
}

#modalImage {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    display: block !important;
    visibility: visible !important;
    object-fit: contain;
    margin: 0 auto;
}

#modalImage:hover {
    transform: scale(1.02);
}

.modal-nav {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: linear-gradient(45deg, #bdc3c7, #95a5a6);
}

.nav-btn:disabled:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(189, 195, 199, 0.2);
}

.modal-info {
    margin-top: 15px;
    color: white;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* === HAFIF GEÇIŞ ANİMASYONLARI === */
@keyframes simpleSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50px);
    }
}

@keyframes simpleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === UÇAN KALPLER GALERİ İÇİN === */
.gallery-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.gallery-hearts .heart {
    position: absolute;
    font-size: 1.5rem;
    animation: floatUp 8s linear infinite;
    opacity: 0;
}

.gallery-hearts .heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.gallery-hearts .heart:nth-child(2) {
    left: 25%;
    animation-delay: 2s;
}

.gallery-hearts .heart:nth-child(3) {
    left: 40%;
    animation-delay: 4s;
}

.gallery-hearts .heart:nth-child(4) {
    left: 60%;
    animation-delay: 1s;
}

.gallery-hearts .heart:nth-child(5) {
    left: 75%;
    animation-delay: 3s;
}

.gallery-hearts .heart:nth-child(6) {
    left: 90%;
    animation-delay: 5s;
}

@keyframes floatUp {
    0% {
        bottom: -100px;
        opacity: 0;
        transform: translateX(0) rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 100vh;
        opacity: 0;
        transform: translateX(100px) rotate(360deg);
    }
}

/* === RESPONSİVE TASARIM === */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .login-card {
        padding: 30px 20px;
        margin: 20px;
        max-width: 100%;
    }
    
    .password-input {
        padding: 14px 45px 14px 14px;
        font-size: 1rem;
    }
    
    .submit-btn {
        padding: 14px;
        font-size: 1rem;
    }
    
    .gallery-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-item {
        border-radius: 15px;
    }
    
    .gallery-image {
        height: 200px;
    }
    
    .logout-btn {
        position: static;
        margin-top: 15px;
        display: inline-block;
    }
    
    .music-btn {
        margin: 10px 5px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .close {
        font-size: 2.5rem;
        right: 15px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    #modalImage {
        max-height: 60vh;
        width: auto;
        height: auto;
    }
    
    .logo {
        max-width: 280px;
    }
    
    /* Mobil performans optimizasyonları */
    .gallery-item:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .gallery-item:hover .gallery-image {
        transform: scale(1.03);
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .login-card {
        padding: 25px 20px;
    }
    
    .logo {
        max-width: 250px;
    }
    
    /* Çok küçük ekranlar için daha da hafif animasyonlar */
    .gallery-item {
        transition: transform 0.2s ease;
    }
    
    .gallery-item:hover {
        transform: translateY(-2px);
    }
    
    .gallery-item:hover .gallery-image {
        transform: none;
    }
}

/* === BASIT ANİMASYON İYİLEŞTİRMELERİ === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeIn 0.6s ease-out;
}

/* === MODAL AÇILIŞ ANİMASYONU === */
.modal.show {
    animation: modalFadeIn 0.3s ease-out;
}

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

.modal.show .modal-content {
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* === PERFORMANS OPTİMİZASYONLARI === */
.gallery-item {
    will-change: transform;
}

.gallery-image {
    will-change: transform, opacity;
}

#modalImage {
    will-change: transform;
}

/* Animasyon bittiğinde will-change'i temizle */
.gallery-item:not(:hover) {
    will-change: auto;
}

.gallery-image.loaded:not(:hover) {
    will-change: auto;
}
