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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 0;
    color: #1a1a1a;
}

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

header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 24px 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #404040 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
}

.input-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.tab-btn:hover {
    color: #1a1a1a;
}

.tab-btn.active {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #1a1a1a;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.url-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1a1a1a;
}

.url-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.05);
}

.url-input::placeholder {
    color: #9ca3af;
}

.download-btn {
    width: 100%;
    padding: 14px 32px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.download-btn:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

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

.loading {
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 16px;
    margin-top: 24px;
    border: 1px solid #e5e7eb;
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #1a1a1a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading p {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

.result-section {
    margin-top: 24px;
}

.result-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.result-item h4 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-preview {
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin: 8px 8px 8px 0;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.download-link:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.15);
}

.profile-info {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #1a1a1a;
    object-fit: cover;
}

.profile-details {
    flex: 1;
}

.profile-details h4 {
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 700;
}

.profile-details p {
    color: #6b7280;
    margin: 6px 0;
    line-height: 1.6;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #1a1a1a;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    border-left: 4px solid #dc2626;
    font-size: 14px;
    line-height: 1.6;
}

.error-message strong {
    font-weight: 600;
}

.success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    border-left: 4px solid #16a34a;
    font-size: 14px;
    line-height: 1.6;
}

.success-message strong {
    font-weight: 600;
}

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

.carousel-item {
    position: relative;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    display: block;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.story-item {
    position: relative;
    background: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.story-item img,
.story-item video {
    width: 100%;
    display: block;
}

footer {
    text-align: center;
    padding: 32px 40px;
    margin-top: 60px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

footer p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

.caption-text {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 3px solid #1a1a1a;
}

.caption-text strong {
    color: #1a1a1a;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.caption-text p {
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    header {
        padding: 20px 24px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .logo-text h1 {
        font-size: 20px;
    }

    .main-content {
        padding: 0 24px;
        margin: 24px auto;
    }

    .input-section {
        padding: 24px;
    }

    .tabs {
        flex-direction: column;
    }

    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .carousel-items,
    .story-grid {
        grid-template-columns: 1fr;
    }
}
