/* style.css - CSS utama */
:root {
    --primary-color: #6c63ff;
    --secondary-color: #4a45b1;
    --accent-color: #ff6584;
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animasi */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Page transition */
.page-transition {
    animation: fadeIn 0.5s ease;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Navbar */
.navbar {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.brand:hover {
    transform: scale(1.05);
}

.brand i {
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsIDI1NSwgMjU1LCAwLjA1KSIvPjwvcGF0dGVybjwvZGVmcz48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI3BhdHRlcm4pIi8+PC9zdmc+');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: slideUp 0.8s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    animation: fadeIn 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    animation: fadeIn 1s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.work-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.work-header {
    position: relative;
    height: 220px;
    background: #f8f9fa;
    overflow: hidden;
}

.work-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.work-card:hover .work-cover {
    transform: scale(1.05);
}

.work-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.3);
    font-size: 3rem;
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    z-index: 1;
}

.work-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.work-content {
    padding: 1.5rem;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
}

.synopsis {
    margin-bottom: 1rem;
}

.synopsis-text {
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 2;
    -moz-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    line-height: 1.5;
}

.work-meta {
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.work-meta span {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.work-meta i {
    margin-right: 0.3rem;
}

.price {
    font-weight: bold;
    color: var(--accent-color);
}

.work-actions {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-read {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-read:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.like-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    color: #ccc;
}

.like-btn:hover {
    transform: scale(1.2);
}

.like-btn.liked {
    color: #ff6b6b;
    animation: pulse 0.5s ease;
}

/* Auth Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-form {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.auth-form p {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-form a:hover {
    text-decoration: underline;
}

/* Alert */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    background-color: #d1ecf1;
    color: #0c5460;
    animation: slideUp 0.5s ease;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    animation: slideUp 0.5s ease;
    max-width: 350px;
}

.notification-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification i {
    font-size: 1.25rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    margin-left: 1rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: var(--transition);
}

.notification-close:hover {
    opacity: 1;
}

.notification.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

/* View All Button */
.view-all {
    text-align: center;
    margin-top: 3rem;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-between;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .work-card {
        height: auto;
    }
    
    .work-header {
        height: auto;
        aspect-ratio: 3/4;
        position: relative;
    }
    
    .work-cover {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .work-cover-placeholder {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(0, 0, 0, 0.3);
        font-size: 3rem;
        background: #f8f9fa;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 576px) {
    .auth-form {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
    }
    
    .work-header {
        aspect-ratio: 2/3;
    }
}

/* Dashboard Header Styles */
.dashboard-header {
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-text h1 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.header-text p {
    color: #666;
    margin: 0;
    font-size: 1.1rem;
}

.username {
    color: #667eea;
    font-weight: 600;
}

/* DateTime Cards */
.header-datetime {
    display: flex;
    gap: 1rem;
}

.datetime-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 140px;
    transition: transform 0.3s ease;
}

.datetime-card:hover {
    transform: translateY(-3px);
}

.datetime-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.datetime-info {
    display: flex;
    flex-direction: column;
}

.datetime-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.datetime-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Header Stats for Author Dashboard */
.header-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 100px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
}

.stat-item i {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.stat-item:nth-child(1) i {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-item:nth-child(2) i {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-item:nth-child(3) i {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
    
    .header-datetime,
    .header-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .datetime-card,
    .stat-item {
        flex: 1;
        min-width: auto;
    }
}

/* Work Card Cover Enhancement */
.work-card {
    position: relative;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.work-card:hover::before {
    opacity: 1;
}

.work-header {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.work-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-cover {
    transform: scale(1.1);
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    z-index: 2;
    transition: transform 0.3s ease;
}

.work-card:hover .work-info {
    transform: translateY(-5px);
}

.work-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.work-type {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.work-type.paid {
    background: rgba(229, 188, 7, 0.9);
    color: rgb(0, 0, 0);
}

.work-type.free {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

/* Empty State Enhancement */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
}

/* Enhanced Work Meta */
.work-meta {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.work-meta span {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 0.85rem;
}

.work-meta i {
    margin-right: 0.3rem;
    font-size: 0.9rem;
}

.price {
    font-weight: bold;
    color: var(--accent-color);
}

/* Enhanced Work Actions */
.work-actions {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}

.btn-read {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-read:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.like-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ccc;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.like-btn:hover {
    transform: scale(1.2);
    background: rgba(255, 107, 107, 0.1);
}

.like-btn.liked {
    color: #ff6b6b;
    animation: pulse 0.5s ease;
}

/* Responsive adjustments for work cards */
@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .work-header {
        height: auto;
        aspect-ratio: 3/4;
    }
    
    .work-info h3 {
        font-size: 1.1rem;
    }
    
    .work-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .work-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-read {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .work-header {
        aspect-ratio: 2/3;
    }
    
    .work-info {
        padding: 1rem;
    }
    
    .work-info h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .category, .work-type {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
}