/* Renk Paleti */
:root {
    --primary: #6B4E71;
    --secondary: #A67C9F;
    --accent: #E8B4B8;
    --background: #F5F5F5;
    --text: #333333;
    --card-bg: #FFFFFF;
    --success: #7CB342;
    --error: #E57373;
    --border: #E0E0E0;
}

/* Reset ve Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.site-logo {
    width: 80px;
    height: 80px;
    animation: fadeIn 0.5s ease-out;
}

.header-text {
    text-align: left;
}

.logo {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
}

/* Form Stilleri - Collapsible */
.confession-form-section {
    background: var(--card-bg);
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-toggle {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.form-toggle:hover {
    background: var(--secondary);
}

.form-toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.form-toggle-icon.open {
    transform: rotate(180deg);
}

.confession-form {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    padding: 0 1.5rem;
}

.confession-form.open {
    max-height: 2000px;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* Butonlar */
.btn-primary,
.btn-secondary,
.btn-back {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-back {
    background: var(--secondary);
    color: white;
    margin-bottom: 1.5rem;
}

.btn-back:hover {
    background: var(--primary);
    transform: translateX(-4px);
}

.back-button-container {
    margin-top: 1.5rem;
    margin-bottom: 1.3rem;
}

.reply-form-section {
    margin-top: .5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.reply-form-section h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.reply-form-section .form-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.replies-section {
    margin-bottom: 2rem;
}

.replies-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.no-replies {
    text-align: center;
    padding: 2rem;
    color: #999;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 78, 113, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

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

/* Ana sayfa confession form için özel stil */
.confession-form .btn-secondary {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.confession-form .form-group {
    margin-bottom: 0.6rem;
}

/* GIF Preview */
.gif-preview {
    margin-top: 1rem;
    position: relative;
    display: inline-block;
}

.gif-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-remove {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.form-message {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    display: none;
}

.form-message.error {
    background: #ffebee;
    color: var(--error);
    border: 1px solid var(--error);
    display: block;
}

.form-message.success {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid var(--success);
    display: block;
}

/* İtiraf Listesi - Grid Layout */
.confessions-section {
    margin: 2rem 0;
}

.confessions-section h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.confessions-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.confession-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.confession-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.confession-card.pinned {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, #fff 0%, #fef5f7 100%);
}

.pinned-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.confession-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.confession-nickname {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
}

.confession-time {
    color: #999;
    font-size: 0.8rem;
}

.confession-content {
    margin: 0.75rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.confession-gif {
    margin: 0.75rem 0;
}

.confession-gif img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.confession-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.confession-footer>span {
    white-space: nowrap;
}

.confession-footer .confession-nickname,
.confession-footer .confession-time {
    margin-right: 0.75rem;
}

.confession-footer .reply-count {
    margin-left: auto;
    margin-right: 0.75rem;
    color: #666;
    font-size: 0.85rem;
}

.reply-count {
    color: #666;
    font-size: 0.85rem;
}

.btn-read-more {
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-read-more:hover {
    background: var(--secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageInfo {
    color: var(--primary);
    font-weight: 600;
}

/* 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: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.gif-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.gif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gif-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

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

.gif-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Toast Bildirimleri - Alt Orta */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    z-index: 10000;
    transition: bottom 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    bottom: 30px;
}

.toast.error {
    background: var(--error);
}

.toast.success {
    background: var(--success);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    grid-column: 1 / -1;
}

/* Responsive Tasarım */
@media (max-width: 1024px) {
    .confessions-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .site-logo {
        width: 60px;
        height: 60px;
    }

    .header-text {
        text-align: center;
    }

    .logo {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .confession-form.open {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .confessions-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .confession-card {
        padding: 1rem;
    }

    .confession-title {
        font-size: 1rem;
    }

    .gif-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .gif-item img {
        height: 100px;
    }

    .toast {
        max-width: 85%;
        padding: 0.75rem 1.5rem;
    }

    .confession-detail-title {
        font-size: 1.2rem;
    }

    .confession-detail-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Erişilebilirlik */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary);
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.confession-card {
    animation: fadeIn 0.5s ease-out;
}

/* Confession Detail Styles */
.confession-detail-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.confession-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.confession-detail-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.confession-detail-content {
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
}

/* Reply Card Styles */
.reply-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1rem;
}

.reply-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.reply-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.reply-nickname {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.reply-time {
    color: #999;
    font-size: 0.8rem;
}

.reply-content {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text);
}

.reply-gif {
    margin-top: 0.75rem;
}

.reply-gif img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}
/* Politika Checkbox Stilleri */
.policy-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.policy-checkbox-label:hover {
    border-color: var(--secondary);
    background-color: #f0f0f0;
}

.policy-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.policy-checkbox-label span {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.5;
}

.policy-link {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

.policy-link:hover {
    color: var(--secondary);
}

/* Politika Popup Stilleri */
.policy-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.policy-popup-overlay.show {
    opacity: 1;
}

.policy-popup-overlay.closing {
    opacity: 0;
}

.policy-popup {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.policy-popup-overlay.show .policy-popup {
    transform: scale(1);
}

.policy-popup-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px 12px 0 0;
}

.policy-popup-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.policy-popup-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.policy-content h3 {
    color: var(--primary);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.policy-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.policy-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.policy-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.policy-footer {
    background-color: #fff3cd;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin-top: 20px;
    font-weight: 500;
}

.policy-popup-footer {
    padding: 20px 24px;
    border-top: 2px solid var(--border);
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.policy-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
}

.policy-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.policy-checkbox span {
    font-size: 0.95rem;
    color: var(--text);
}

.policy-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.policy-buttons .btn-cancel,
.policy-buttons .btn-accept {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.policy-buttons .btn-cancel {
    background-color: #e0e0e0;
    color: var(--text);
}

.policy-buttons .btn-cancel:hover {
    background-color: #d0d0d0;
}

.policy-buttons .btn-accept {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.policy-buttons .btn-accept:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 78, 113, 0.3);
}

.policy-buttons .btn-accept:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobil Responsive */
@media (max-width: 768px) {
    .policy-popup {
        max-width: 95%;
        max-height: 85vh;
    }

    .policy-popup-header h2 {
        font-size: 1.2rem;
    }

    .policy-popup-body {
        padding: 16px;
    }

    .policy-content h3 {
        font-size: 1rem;
    }

    .policy-buttons {
        flex-direction: column;
    }

    .policy-buttons .btn-cancel,
    .policy-buttons .btn-accept {
        width: 100%;
    }
}
