:root {
    --bg-primary: #121212;
    --bg-secondary: #1E1E1E;
    --bg-card: #252525;
    
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    
    --accent-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --accent-color: #dc2743;
    
    --border-color: #333333;
    --input-bg: #2A2A2A;
    --input-focus: #3A3A3A;
    
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

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

.main-content {
    flex: 1;
    padding: 4rem 0;
}

/* Header & Nav */
header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 5rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Cards Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: left;
    transition: var(--transition);
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #444;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tool-card h3 {
    margin-bottom: 1rem;
}

.tool-card p {
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    outline: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #e0e0e0;
    color: var(--bg-primary);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--input-focus);
}

/* Tool Interface Specifics */
.tool-interface {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--border-color);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.url-input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.url-input:focus {
    border-color: #555;
    background-color: var(--input-focus);
}

.btn-paste {
    position: absolute;
    right: 140px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
}

.btn-paste:hover {
    color: var(--text-primary);
}

.btn-submit {
    padding: 0 2rem;
    border-radius: var(--radius-md);
}

/* Status / Results Area */
.result-container {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: none; /* hidden by default */
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.media-preview {
    width: 100%;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-preview img, 
.media-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.result-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-actions .btn {
    flex: 1;
    min-width: 150px;
}

.error-message {
    background-color: rgba(220, 39, 67, 0.1);
    border: 1px solid rgba(220, 39, 67, 0.3);
    color: #ff6b6b;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    display: none;
}

/* Sections */
.content-section {
    max-width: 800px;
    margin: 5rem auto;
}

.content-section h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.faq-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 600px;
}

.footer-bottom {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
