/* Genel Stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    position: relative;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 
        0 2px 10px rgba(0,0,0,0.3),
        0 4px 20px rgba(0,0,0,0.2),
        0 0 30px rgba(255,255,255,0.1);
    letter-spacing: 2px;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

header h1:hover {
    transform: scale(1.05);
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    border-radius: 2px;
    animation: expandLine 1s ease-out 0.5s both;
}

@keyframes expandLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100px;
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.15em;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-top: 10px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* Arama Bölümü */
.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: #ff9800;
    color: white;
}

.btn-secondary:hover {
    background: #e68900;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
}

/* Ana İçerik */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    height: fit-content;
    position: sticky;
    top: 20px;
    transition: transform 0.3s ease;
}

.sidebar-overlay {
    display: none;
}

.sidebar h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.category-list {
    list-style: none;
    margin-bottom: 25px;
}

.category-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.category-list li:hover {
    background: #f0f0f0;
    border-left-color: #667eea;
    transform: translateX(5px);
}

.category-list li.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #764ba2;
    font-weight: bold;
}

.category-list li .count {
    float: right;
    background: rgba(255,255,255,0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
}

.stats-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.stats-box h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.stats-box p {
    margin-bottom: 8px;
    color: #555;
}

.stats-box strong {
    color: #667eea;
    font-size: 1.2em;
}

/* İçerik Alanı */
.content-area {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-height: 600px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.content-header h2 {
    color: #667eea;
    font-size: 1.8em;
}

.view-controls {
    display: flex;
    gap: 10px;
}

/* Fıkralar Container */
.jokes-container {
    display: grid;
    gap: 20px;
}

.joke-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    transition: all 0.3s;
    cursor: pointer;
}

.joke-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-left-color: #764ba2;
}

.joke-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.joke-title {
    font-size: 1.3em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 5px;
}

.joke-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    margin-top: 5px;
}

.joke-content {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    max-height: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.joke-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #888;
}

.joke-meta {
    display: flex;
    gap: 15px;
}

.read-more {
    color: #667eea;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 50px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.pagination button {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .active {
    background: #667eea;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #667eea;
}

.modal-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    color: #888;
    font-size: 0.9em;
}

.modal-body {
    line-height: 1.8;
    color: #555;
    font-size: 1.1em;
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 30px;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.empty-state h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #667eea;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2em;
        letter-spacing: 1px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .view-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    .joke-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .joke-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 25px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8em;
        letter-spacing: 0.5px;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        display: block;
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .search-box {
        gap: 8px;
    }
    
    #searchInput {
        padding: 12px 18px;
        font-size: 16px; /* iOS zoom önleme */
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
    }
    
    .content-area {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .content-header h2 {
        font-size: 1.5em;
    }
    
    .joke-card {
        padding: 18px;
        border-left-width: 4px;
    }
    
    .joke-title {
        font-size: 1.2em;
    }
    
    .joke-content {
        font-size: 0.95em;
        max-height: 120px;
    }
    
    .joke-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 0.85em;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination button {
        padding: 8px 15px;
        font-size: 14px;
        min-width: 44px; /* Touch-friendly */
        min-height: 44px;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 20px;
        padding-top: 60px;
    }
    
    .close {
        position: fixed;
        top: 15px;
        right: 20px;
        font-size: 32px;
        z-index: 1001;
    }
    
    .modal-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .stats-box {
        padding: 15px;
    }
    
    .category-list li {
        padding: 14px 15px;
        min-height: 44px; /* Touch-friendly */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.5em;
        letter-spacing: 0.5px;
    }
    
    header h1::after {
        width: 60px;
    }
    
    .subtitle {
        font-size: 0.9em;
    }
    
    #searchInput {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .content-area {
        padding: 15px 10px;
    }
    
    .content-header h2 {
        font-size: 1.3em;
    }
    
    .joke-card {
        padding: 15px;
    }
    
    .joke-title {
        font-size: 1.1em;
    }
    
    .joke-content {
        font-size: 0.9em;
        max-height: 100px;
    }
    
    .pagination button {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .modal-content {
        padding: 15px;
        padding-top: 50px;
    }
    
    .modal-body {
        font-size: 1em;
    }
    
    .sidebar {
        width: 100%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .joke-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
    
    .category-list li:active {
        transform: scale(0.98);
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 300px;
    }
    
    .modal-content {
        padding-top: 40px;
    }
}

