/**
 * Görsel Portal - Modern CSS
 * Glassmorphism, animations, responsive grid
 */

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1e293b;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* Portal Wrapper */
.portal-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.portal-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.portal-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Merriweather', serif;
    font-weight: 900;
    font-size: 20px;
    color: #1e293b;
}

.portal-logo i {
    font-size: 24px;
    color: #10b981;
}

.portal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-nav a {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-nav a:hover,
.portal-nav a.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.portal-nav .btn-upload {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.portal-nav .btn-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.back-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-link:hover {
    color: #10b981;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    padding: 50px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 30s linear infinite;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 30px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero-content h1 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    margin-bottom: 10px;
}

.hero-content h1 i {
    margin-right: 10px;
    opacity: 0.8;
}

.hero-content p {
    opacity: 0.9;
    margin-bottom: 25px;
}

/* Hero Search */
.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 24px;
    font-size: 15px;
    color: #fff;
    outline: none;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.hero-search button {
    border: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 14px 24px;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-search button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Portal Content */
.portal-content {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

/* Main Section */
.content-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #10b981;
}

.see-all {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
}

.see-all:hover {
    text-decoration: underline;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f1f5f9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 30px 10px 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
}

.gallery-meta {
    font-size: 10px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-count {
    background: #10b981;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 9px;
    margin-left: auto;
}

.gallery-link {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s;
}

.gallery-item:hover .gallery-link {
    opacity: 1;
    transform: scale(1);
}

.gallery-link:hover {
    background: #10b981;
    color: #fff;
}

/* Sidebar */
.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 20px;
}

.sidebar-widget h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget h3 i {
    color: #10b981;
}

/* Popular List */
.popular-list {
    list-style: none;
}

.popular-list li {
    margin-bottom: 8px;
}

.popular-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.popular-list a:hover {
    background: rgba(16, 185, 129, 0.08);
}

.popular-list img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.popular-list i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 6px;
    color: #94a3b8;
}

.popular-title {
    flex: 1;
    font-size: 13px;
    color: #334155;
}

.popular-count {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Uploaders Grid */
.uploaders-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.uploader-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 5px;
    border-radius: 8px;
    transition: background 0.2s;
}

.uploader-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

.uploader-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.uploader-name {
    font-size: 10px;
    color: #64748b;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Random Topic */
.random-topic {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    margin-bottom: 10px;
}

.random-topic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.random-topic:hover img {
    transform: scale(1.05);
}

.random-topic span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 20px 12px 12px;
    font-size: 13px;
    font-weight: 500;
}

.refresh-btn {
    display: block;
    text-align: center;
    padding: 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    color: #10b981;
    font-size: 12px;
    font-weight: 500;
}

.refresh-btn:hover {
    background: rgba(16, 185, 129, 0.15);
}

/* Footer */
.portal-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
    .portal-content {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-widget {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .portal-header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .portal-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .hero-section {
        padding: 30px 15px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 22px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .sidebar-widget {
        min-width: 100%;
    }

    .uploaders-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}