/* KFC Thursday Copywriting Frontend Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.kfc-thursday-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header Styles */
.kfc-header {
    background: linear-gradient(135deg, #e4002b 0%, #ff6b6b 100%);
    color: white;
    padding: 40px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.kfc-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-emoji {
    font-size: 48px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.site-title {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.header-subtitle {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Toolbar Styles */
.kfc-toolbar {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.kfc-toolbar .kfc-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    display: flex;
    gap: 10px;
}

#search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e4002b;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s;
}

#search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(228, 0, 43, 0.1);
}

#search-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #e4002b 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

#search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(228, 0, 43, 0.3);
}

.sort-options {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 10px 20px;
    background: #165fd1;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.sort-btn.active {
    background: #e4002b;
    color: white;
    border-color: #e4002b;
}

.sort-btn:hover:not(.active) {
    border-color: #ffffff;
    color: #ffffff;
}

/* Main Content Area */
.kfc-main {
    padding: 40px 0 80px;
    min-height: calc(100vh - 300px);
}

/* Copywriting Grid */
.copywriting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Styles */
.copywriting-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.copywriting-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e4002b, #ff6b6b, #e4002b);
    background-size: 200% 100%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.copywriting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-emoji {
    font-size: 36px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-title {
    flex: 1;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.card-content {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #666;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.card-content::-webkit-scrollbar-thumb {
    background: #e4002b;
    border-radius: 3px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #999;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-like, .btn-copy {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #e4002b;
    background: white;
    color: #e4002b;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: bold;
}

.btn-like.liked {
    background: #e4002b;
    color: white;
}

.btn-copy:hover {
    background: #e4002b;
    color: white;
    transform: scale(1.05);
}

.btn-like:hover {
    transform: scale(1.05);
}

.like-icon {
    font-size: 16px;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e4002b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: white;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.empty-state p {
    font-size: 20px;
    opacity: 0.9;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e4002b 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 999;
    font-size: 24px;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    z-index: 10000;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

.toast-content {
    font-size: 18px;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kfc-header {
        padding: 30px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .stat-item {
        justify-content: center;
    }
    
    .kfc-toolbar .kfc-container {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
    
    .sort-options {
        width: 100%;
        justify-content: center;
    }
    
    .copywriting-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .card-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .logo-emoji {
        font-size: 36px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    #search-input {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    #search-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .copywriting-card {
        padding: 20px;
    }
    
    .card-title {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .kfc-toolbar,
    .back-to-top,
    .card-actions {
        display: none !important;
    }
    
    .copywriting-card {
        page-break-inside: avoid;
    }
}