/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-white: #ffffff;
    --color-black: #000000;
    --color-pink: #ff6b9d;
    --color-pink-light: #ffb3d1;
    --color-pink-dark: #e5557f;
    --color-gray-light: #f5f5f5;
    --color-gray: #e0e0e0;
    --color-gray-dark: #666666;
    --color-text: #333333;
    --color-text-light: #888888;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-weight: 300;
}

/* Navbar */
.navbar {
    background-color: var(--color-white);
    color: var(--color-text);
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--color-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 400;
}

.logo-icon {
    width: 24px;
    height: 24px;
    stroke: var(--color-text);
}

.logo-text {
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 300;
    transition: var(--transition);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-link svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.nav-link:hover {
    color: var(--color-pink);
    background-color: var(--color-gray-light);
}

.nav-link-text {
    display: inline;
}

.admin-link {
    color: var(--color-pink);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flash-message {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background-color: var(--color-pink);
    color: var(--color-white);
}

.flash-error {
    background-color: #dc3545;
    color: var(--color-white);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Hero Section - Removed */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    gap: 0.5rem;
}

.btn svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.btn-primary {
    background-color: var(--color-pink);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-pink-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-success {
    background-color: #28a745;
    color: var(--color-white);
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-liked {
    background-color: var(--color-pink);
    color: var(--color-white);
}

.btn-liked:hover {
    background-color: var(--color-pink-dark);
}

/* Wallpapers Grid */
.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.wallpaper-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.wallpaper-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.wallpaper-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wallpaper-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background-color: var(--color-gray-light);
}

.wallpaper-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.wallpaper-card:hover .wallpaper-image {
    transform: scale(1.05);
}

.wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0) 20%,
        rgba(0, 0, 0, 0) 65%,
        rgba(0, 0, 0, 0.8) 100%);
    opacity: 1;
    transition: var(--transition);
}

.wallpaper-overlay-top {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: flex-start;
}

.wallpaper-overlay-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.view-count,
.like-count {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-count svg,
.like-count svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.wallpaper-title-overlay {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-white);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.wallpaper-date-overlay {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.wallpaper-info {
    display: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-text {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-text);
    background-color: var(--color-gray-light);
    transition: var(--transition);
    border: 2px solid transparent;
}

.pagination-link:hover {
    background-color: var(--color-pink);
    color: var(--color-white);
    border-color: var(--color-pink);
}

.pagination-link.active {
    background-color: var(--color-pink);
    color: var(--color-white);
    border-color: var(--color-pink);
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--color-text-light);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--color-black);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
}

/* Upload Form */
.upload-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-form {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 3px dashed var(--color-gray);
    border-radius: var(--border-radius);
    background-color: var(--color-gray-light);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.file-upload-label:hover {
    border-color: var(--color-pink);
    background-color: rgba(255, 107, 157, 0.05);
}

.file-upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-upload-text {
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.preview-container {
    margin-top: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Auth */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--color-black);
}

.auth-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.auth-form {
    margin-top: 2rem;
}

/* Admin */
.admin-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 400;
    background-color: var(--color-gray-light);
    color: var(--color-text);
    transition: var(--transition);
    border: 2px solid transparent;
}

.filter-btn:hover {
    background-color: var(--color-gray);
}

.filter-btn.active {
    background-color: var(--color-pink);
    color: var(--color-white);
    border-color: var(--color-pink);
}

.admin-table-container {
    overflow-x: auto;
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    display: block;
}

/* Admin Cards for Mobile */
.admin-cards {
    display: none;
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.admin-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.admin-card-image {
    width: 100%;
    padding-top: 75%;
    position: relative;
    overflow: hidden;
    background-color: var(--color-gray-light);
}

.admin-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-card-content {
    padding: 1rem;
}

.admin-card-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-card-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.admin-card-item svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.admin-card-status {
    margin-bottom: 0.75rem;
}

.admin-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-card-actions .btn {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.admin-card-actions .btn svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--color-black);
    color: var(--color-white);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 400;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray);
}

.admin-table tbody tr:hover {
    background-color: var(--color-gray-light);
}

.admin-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 400;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.empty-table {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-light);
}

/* View Page */
.view-container {
    max-width: 900px;
    margin: 0 auto;
}

.view-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 300;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--color-pink);
}

.view-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--color-black);
}

.view-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--color-text-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.view-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-meta svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.view-info {
    display: flex;
    gap: 1.5rem;
    color: var(--color-text-light);
    font-size: 0.85rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: var(--color-gray-light);
    border-radius: var(--border-radius);
}

.view-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-info svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* Phone Mockup */
.phone-mockup-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: var(--border-radius);
}

.mockup-image-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.mockup-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.phone-mockup {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.phone-frame {
    position: relative;
    width: 100%;
    padding-bottom: 207.5%; /* iPhone 14 Pro Max aspect ratio */
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 8px #1a1a1a,
                0 0 0 10px #2d2d2d,
                inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.phone-screen {
    position: absolute;
    top: 20px;
    left: 8px;
    right: 8px;
    bottom: 20px;
    background-color: var(--color-black);
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-wallpaper {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background-color: var(--color-black);
    border-radius: 0 0 20px 20px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background-color: #333;
    border-radius: 3px;
}

.view-image-wrapper {
    background-color: var(--color-gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.view-image {
    width: 100%;
    height: auto;
    display: block;
}

.view-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.view-actions-primary {
    width: 100%;
}

.view-actions-primary .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1.1rem;
}

.view-actions-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    width: 100%;
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    min-height: 80px;
}

.btn-action svg {
    flex-shrink: 0;
    stroke: currentColor;
}

.btn-action span {
    font-size: 0.9rem;
}

.action-count {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: -0.25rem;
}

.view-actions .btn svg {
    flex-shrink: 0;
    stroke: currentColor;
}

/* Footer */
.footer {
    background-color: var(--color-white);
    padding: 1rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--color-gray);
}

/* Featured Sections */
.featured-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-gray-light);
    border-radius: 6px;
    border-left: 2px solid var(--color-pink);
}

.section-title svg {
    stroke: var(--color-pink);
    width: 18px;
    height: 18px;
}

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

.all-wallpapers-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--color-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 1rem;
        padding: 0.4rem 0.75rem;
    }

    .section-title svg {
        width: 16px;
        height: 16px;
    }

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

    .phone-mockup-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .mockup-image-wrapper {
        max-width: 100%;
    }

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

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

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

    .wallpaper-overlay {
        padding: 0.5rem;
        background: linear-gradient(to bottom, 
            rgba(0, 0, 0, 0.5) 0%, 
            rgba(0, 0, 0, 0) 15%,
            rgba(0, 0, 0, 0) 60%,
            rgba(0, 0, 0, 0.85) 100%);
    }

    .wallpaper-title-overlay {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .wallpaper-date-overlay {
        font-size: 0.8rem;
    }

    .view-count,
    .like-count {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .nav-content {
        flex-direction: row;
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem;
    }

    .nav-link-text {
        display: none;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .admin-table-container {
        display: none;
    }

    .admin-cards {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-card-actions {
        flex-direction: column;
    }

    .admin-card-actions .btn {
        width: 100%;
    }

    .view-container {
        padding: 0;
    }

    .view-header {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }

    .view-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .view-meta {
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
    }

    .view-meta span {
        flex: 1;
        justify-content: center;
        padding: 0.5rem;
        background-color: var(--color-gray-light);
        border-radius: 8px;
    }

    .view-info {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .view-info span {
        padding: 0.5rem 0;
    }

    .phone-mockup-container {
        padding: 1rem;
        margin: 1rem 0;
    }

    .phone-mockup {
        width: 200px;
        margin: 0 auto;
    }

    .view-image-wrapper {
        margin: 1rem 0;
        border-radius: 0;
    }

    .view-actions {
        padding: 0 1rem;
        margin-top: 1.5rem;
        gap: 0.75rem;
    }

    .view-actions-primary .btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .view-actions-secondary {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .btn-action {
        min-height: 70px;
        padding: 0.75rem 0.5rem;
    }

    .btn-action span {
        font-size: 0.85rem;
    }

    .action-count {
        font-size: 0.7rem;
    }

    .container {
        padding: 0;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

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

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .wallpapers-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .phone-mockup {
        width: 160px;
    }

    .view-title {
        font-size: 1.25rem;
    }

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

    .view-meta span {
        justify-content: flex-start;
    }

    .view-actions-secondary {
        grid-template-columns: 1fr;
    }

    .btn-action {
        flex-direction: row;
        justify-content: flex-start;
        min-height: 50px;
        padding: 0.75rem 1rem;
    }

    .action-count {
        margin-left: auto;
        margin-top: 0;
    }
}


/* ========== Search & Filter Section ========== */
.search-filter-section {
    margin: 0 auto 3rem;
    padding: 2rem;
    max-width: 900px;
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-gray);
}

.search-form {
    width: 100%;
}

.search-form-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-dark);
    pointer-events: none;
    z-index: 1;
    transition: var(--transition);
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--color-gray);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 300;
    background: var(--color-white);
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-input:hover {
    border-color: var(--color-pink-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-input:focus + .search-icon,
.search-input:focus ~ .search-icon {
    color: var(--color-pink);
}

.category-filter {
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.filter-icon {
    position: absolute;
    left: 14px;
    color: var(--color-gray-dark);
    pointer-events: none;
    z-index: 1;
    transition: var(--transition);
}

.category-select {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border: 2px solid var(--color-gray);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 300;
    background: var(--color-white);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-select:hover {
    border-color: var(--color-pink-light);
}

.category-select:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.category-select:focus ~ .filter-icon,
.category-select:focus + .filter-icon {
    color: var(--color-pink);
}

.search-btn {
    padding: 1rem 2rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    border-radius: 12px;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(255, 107, 157, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

.clear-btn {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
    transition: var(--transition);
}

.clear-btn:hover {
    transform: translateY(-1px);
}

/* ========== Category Tags ========== */
.wallpaper-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 107, 157, 0.1);
    color: var(--color-pink-dark);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 400;
    border: 1px solid rgba(255, 107, 157, 0.2);
}

/* ========== Categories Checkbox Group ========== */
.categories-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--color-gray-light);
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-pink);
}

.checkbox-text {
    font-size: 0.9rem;
    font-weight: 300;
    user-select: none;
}

.no-categories {
    color: var(--color-text-light);
    font-style: italic;
    padding: 1rem;
}

/* ========== Category Management ========== */
.category-form-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--color-gray-light);
    border-radius: var(--border-radius);
}

.categories-list-section {
    margin-top: 2rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.category-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-pink);
}

.category-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--color-text);
    margin: 0;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: var(--transition);
    border-radius: 6px;
}

.btn-icon:hover {
    background: var(--color-gray-light);
    color: var(--color-text);
}

.delete-category-btn:hover {
    color: #dc3545;
}

.category-description {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 300;
}

.category-stats {
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-gray);
}

.category-count {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 300;
}

/* ========== Modal ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--color-white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 400;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--color-gray-light);
    color: var(--color-text);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--color-gray);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 300;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--color-pink);
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    .search-filter-section {
        margin: 0 1rem 2rem;
        padding: 1.5rem;
        max-width: 100%;
    }

    .search-form-content {
        flex-direction: column;
    }

    .search-input-wrapper,
    .category-filter {
        width: 100%;
        min-width: 100%;
    }

    .search-btn,
    .clear-btn {
        width: 100%;
        justify-content: center;
    }

    .categories-checkbox-group {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 1rem;
        max-height: 85vh;
    }
}
