:root {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --card-bg: #2d2d2d;
    --input-bg: #333333;
    --border-color: #404040;
    --primary-color: #4a9eff;
    --primary-hover: #3d84d4;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#promptInput {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

#generateBtn {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

#generateBtn:hover {
    background-color: var(--primary-hover);
}

.current-image {
    display: none;
    margin: 30px auto;
    text-align: center;
    max-width: 600px;
    background: rgba(45, 45, 45, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.current-image.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.current-image:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.current-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.current-image .image-prompt {
    margin-top: 15px;
    font-size: 16px;
    color: var(--text-color);
    padding: 10px;
    padding-bottom: 40px;
}

.current-image:empty {
    display: none;
}

.image-history {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.image-card {
    position: relative;
    background: rgba(45, 45, 45, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    padding-bottom: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.image-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.prompt-container {
    position: relative;
    display: block;
    margin-top: 15px;
    padding: 10px;
    padding-bottom: 45px;
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.image-prompt {
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.image-date {
    position: absolute;
    bottom: 15px;
    left: 15px;
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.status {
    padding: 12px;
    margin: 10px;
    border-radius: 4px;
}

.status.error {
    background-color: #442726;
    color: #ff8b8b;
    border: 1px solid #663838;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #ddd;
}

/* Loading Styles */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-color);
    margin-top: 20px;
    font-size: 18px;
    text-align: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Buton yükleniyor durumu */
#generateBtn.loading {
    position: relative;
    color: transparent;
}

#generateBtn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.action-buttons {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.image-card:hover .action-buttons {
    opacity: 1;
}

.action-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
    transition: all 0.2s ease;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.action-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 16px;
}

.action-btn.copied::after {
    bottom: calc(100% + 5px);
}

/* Toast Message Styles */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -20px);
}

.toast i {
    font-size: 16px;
}

/* Modal içindeki indirme butonu */
.modal-download {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    z-index: 1002;
}

.modal-download:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-download i {
    font-size: 16px;
}

/* Görsel container'ı */
.modal-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 90vh;
}

/* Kredi göstergesi stili */
.credit-indicator {
    position: fixed !important;
    top: 30px !important;
    right: 30px !important;
    left: auto !important;
    background-color: var(--card-bg);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

/* Kredi bilgisi container'ı */
.credit-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credit-indicator i {
    color: var(--primary-color);
}

.countdown-timer {
    font-size: 12px;
    color: var(--primary-color);
    margin-top: 5px;
    display: none;
}

.countdown-timer.active {
    display: block;
}

/* Toast mesajı için ek stiller */
.toast.warning {
    background-color: #ff9800;
}

.toast.error {
    background-color: #f44336;
}

.current-image:hover .action-buttons,
.image-card:hover .action-buttons {
    opacity: 1;
}

.prompt-title {
    margin: 0;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Logo stilleri */
.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 0 15px;
    /* Mobilde kenarlardan taşmaması için */
}

.logo {
    width: 100%;
    /* Container'a göre genişlik */
    max-width: 512px;
    /* Maksimum genişlik */
    height: auto;
    /* Oranı koru */
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

/* Responsive ayarlar */
@media screen and (max-width: 768px) {
    .logo {
        max-width: 400px;
        /* Tablet için */
    }
}

@media screen and (max-width: 480px) {
    .logo {
        max-width: 300px;
        /* Mobil için */
    }

    .logo-container {
        margin: 20px 0;
        /* Mobilde margin'i azalt */
    }
}