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

:root {
    --primary: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-900: #111827;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: var(--gray-900);
    line-height: 1.6;
}

/* ========== LANDING PAGE ========== */

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

header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

header .tagline {
    font-size: 1.2em;
    opacity: 0.95;
}

.hero {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.hero h2 {
    color: var(--gray-900);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.hero p {
    margin-bottom: 15px;
    color: var(--gray-600);
}

.hero ul {
    list-style: none;
    margin: 20px 0;
}

.hero li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--gray-600);
}

.hero li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.pricing h2 {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 30px;
}

.plan {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.plan.pro {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), white);
    transform: scale(1.05);
}

.plan h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.plan .price {
    font-size: 2em;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 20px;
}

.plan ul {
    list-style: none;
    margin-bottom: 30px;
}

.plan li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

.plan li:last-child {
    border-bottom: none;
}

.faq {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.faq h2 {
    margin-bottom: 30px;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-200);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

.cta {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.cta h2 {
    margin-bottom: 30px;
    color: white;
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-200);
}

/* ========== APP INTERFACE ========== */

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

.app-header h1 {
    font-size: 1.8em;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.pro-status {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.pro-status.pro {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.btn-icon {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    padding: 5px;
}

.app-main {
    flex: 1;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.create-section {
    background: var(--gray-50);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    height: fit-content;
}

.create-section h2 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-900);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ========== BUTTONS ========== */

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-400);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.85em;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1em;
}

.btn-copy {
    background: var(--secondary);
    color: white;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--gray-900);
}

/* ========== LINKS SECTION ========== */

.links-section h2 {
    margin-bottom: 20px;
}

.filters {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 15px;
    margin-bottom: 20px;
}

.filters input,
.filters select {
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-600);
}

.link-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease;
}

.link-card:hover {
    box-shadow: var(--shadow-lg);
}

.link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.link-header h3 {
    margin: 0;
}

.program-tag {
    background: var(--gray-200);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--gray-600);
}

.link-body {
    margin-bottom: 15px;
}

.short-code {
    background: var(--gray-50);
    padding: 10px;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.short-code label {
    font-size: 0.85em;
    color: var(--gray-600);
    display: block;
    margin-bottom: 5px;
}

.short-code code {
    display: inline-block;
    background: var(--gray-900);
    color: #0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin-right: 10px;
}

.watermark {
    font-size: 0.85em;
    color: var(--gray-400);
    font-style: italic;
    padding: 10px;
    text-align: right;
}

.stats {
    font-size: 0.9em;
    color: var(--gray-600);
}

.link-actions {
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--gray-200);
    padding-top: 15px;
}

/* ========== MODALS ========== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.payment-methods {
    margin: 20px 0;
}

.payment-option {
    background: var(--gray-50);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary);
}

.payment-option h4 {
    margin-bottom: 8px;
}

.payment-option code {
    display: block;
    background: var(--gray-900);
    color: #0f0;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    margin-bottom: 8px;
    word-break: break-all;
}

.unlock-form {
    margin: 20px 0;
}

.unlock-form ol {
    margin-left: 20px;
    margin-bottom: 15px;
    color: var(--gray-600);
}

.detail-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-weight: bold;
    color: var(--gray-900);
    display: block;
    margin-bottom: 5px;
}

.detail-item code {
    display: block;
    background: var(--gray-900);
    color: #0f0;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
    word-break: break-all;
}

/* ========== NOTIFICATIONS ========== */

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .app-main {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2em;
    }

    .header-right {
        gap: 10px;
    }

    .pricing {
        grid-template-columns: 1fr;
    }

    .plan.pro {
        transform: scale(1);
    }
}
