/* Modern CSS Reset with Gradient Colors */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --secondary-hover: #475569;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --success-color: #10b981;
    --success-hover: #059669;
    --warning-color: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #10b981, #059669);
    --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-gradient);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    text-align: center;
    padding: 3rem 0 2rem;
    color: white;
}

.app-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.app-header .icon {
    font-size: 2.5rem;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
.main-content {
    padding-bottom: 3rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow-lg);
    border: none;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.card-body {
    padding: 2rem;
}

.card-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.card-subtitle {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.success-card {
    border-left: 4px solid var(--success-color);
}

.error-card {
    border-left: 4px solid var(--danger-color);
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--card-bg);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-textarea {
    resize: vertical;
    min-height: 250px;
    line-height: 1.7;
}

.title-input {
    font-size: 1.375rem;
    font-weight: 600;
}

.content-input {
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-copy {
    padding: 0.75rem 1.25rem;
    background: var(--secondary-color);
    border-radius: 8px;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Alerts */
.alert {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    position: relative;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

/* URL Sections */
.url-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.url-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-area {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.url-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Action Links */
.action-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Posts List */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.post-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.post-info {
    flex: 1;
}

.post-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.post-link:hover {
    text-decoration: underline;
}

.post-title {
    display: block;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
}

.meta-item {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-icon {
    font-size: 0.8rem;
}

/* Post Content */
.post-card {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    line-height: 1.3;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
    white-space: pre-wrap;
    margin-bottom: 0;
}

.post-content .content-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.post-content .content-link:hover {
    color: var(--primary-hover);
    border-bottom-color: transparent;
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
}

.post-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Success Links */
.success-link {
    color: #065f46;
    text-decoration: underline;
    font-weight: 600;
}

.success-link:hover {
    color: #064e3b;
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Post Form */
.post-form {
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .app-header {
        padding: 2rem 0 1.5rem;
    }
    
    .app-header h1 {
        font-size: 2.25rem;
    }
    
    .card {
        border-radius: 12px;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .action-links {
        flex-direction: column;
    }
    
    .post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .copy-area {
        flex-direction: column;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .post-meta {
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}