* {
    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, monospace;
    background: #f5f7fa;
    color: var(--gray-900);
    line-height: 1.6;
}

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

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

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%;
}

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

.comparison table {
    width: 100%;
    border-collapse: collapse;
}

.comparison th {
    background: var(--gray-100);
    padding: 12px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid var(--gray-300);
}

.comparison td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.comparison tr:hover {
    background: var(--gray-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: 100%;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

.header-right {
    display: flex;
    gap: 15px;
    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.2em;
    cursor: pointer;
    padding: 5px;
}

.app-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
}

.request-panel {
    background: var(--gray-50);
    padding: 20px;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
}

.response-panel {
    display: grid;
    grid-template-rows: 1fr 300px;
    background: white;
    overflow-y: auto;
}

.request-builder h2,
.response-section h2 {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.method-url {
    display: grid;
    grid-template-columns: 100px 1fr 100px;
    gap: 10px;
    margin-bottom: 20px;
}

.method-select,
.body-type-select {
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.9em;
}

input[type="url"] {
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: monospace;
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gray-300);
}

.tab-btn {
    padding: 10px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    font-size: 0.9em;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

.headers-list,
.params-list {
    margin-bottom: 15px;
}

.header-row,
.param-row {
    display: grid;
    grid-template-columns: 1fr 1fr 40px;
    gap: 10px;
    margin-bottom: 10px;
}

.header-key,
.header-value,
.param-key,
.param-value {
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.85em;
}

.body-input {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.85em;
    resize: vertical;
}

.response-section {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    overflow-y: auto;
}

.response-status {
    padding: 10px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 10px;
    font-weight: bold;
}

.response-time {
    font-size: 0.85em;
    color: var(--gray-600);
    margin-bottom: 15px;
}

.response-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gray-300);
}

.resp-tab-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    font-size: 0.85em;
    font-weight: 500;
}

.resp-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.response-text {
    background: var(--gray-900);
    color: #0f0;
    padding: 10px;
    border-radius: var(--radius);
    font-family: monospace;
    font-size: 0.8em;
    overflow-x: auto;
    max-height: 300px;
}

.history-section {
    padding: 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    overflow-y: auto;
}

.history-section h3 {
    margin-bottom: 15px;
    font-size: 0.95em;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background: white;
    padding: 10px;
    border-radius: var(--radius);
    border-left: 4px solid var(--gray-300);
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.history-method {
    display: inline-block;
    padding: 2px 6px;
    background: var(--gray-200);
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 8px;
}

.history-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
    margin-right: 8px;
}

.history-status.success {
    background: #d1fae5;
    color: #065f46;
}

.history-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.history-status.error {
    background: #fee2e2;
    color: #7f1d1d;
}

.history-time {
    font-size: 0.75em;
    color: var(--gray-600);
}

.history-url {
    font-size: 0.8em;
    color: var(--gray-600);
    margin-top: 5px;
    word-break: break-all;
    font-family: monospace;
}

/* ========== 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-danger {
    background: var(--danger);
    color: white;
    padding: 5px 10px;
    font-size: 0.85em;
}

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

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

/* ========== 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;
}

.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);
}

.unlock-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

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

/* ========== 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;
}

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

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

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

    .response-panel {
        display: flex;
        flex-direction: column;
    }

    .history-section {
        max-height: 200px;
    }
}

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

    header h1 {
        font-size: 2em;
    }

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

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