:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    color: var(--dark);
    background: var(--light);
}

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

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */
.btn-primary, .btn-large, .btn-pro, .btn-pro-small, .btn-replay, .btn-copy, .btn-secondary, .btn-small {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

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

.btn-primary:hover, .btn-large:hover {
    background: var(--secondary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-pro, .btn-pro-small {
    background: var(--secondary);
    color: white;
}

.btn-pro:hover, .btn-pro-small:hover {
    background: #7c3aed;
}

.btn-pro-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

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

.btn-secondary, .btn-small {
    background: var(--border);
    color: var(--dark);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero .subtitle {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Features */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature {
    padding: 2rem;
    background: var(--light);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.feature h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Pricing */
.pricing {
    padding: 80px 0;
    background: var(--light);
}

.pricing h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.plan {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.plan.pro {
    border: 2px solid var(--secondary);
    transform: scale(1.05);
}

.plan h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.plan .price {
    font-size: 2rem;
    color: var(--primary);
    margin: 1rem 0;
}

.plan ul {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.plan li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

/* App Page */
.app-page {
    background: var(--light);
    min-height: 100vh;
}

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

.app-header {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.app-title h1 {
    margin: 0;
    color: var(--primary);
}

.pro-status {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.pro-status.pro {
    color: var(--secondary);
    font-weight: bold;
}

.app-content {
    display: grid;
    gap: 2rem;
}

.panel {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.panel h2 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.url-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.url-box input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
}

.hint {
    color: #666;
    font-size: 0.9rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-controls {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
}

.webhook-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.webhook-item {
    padding: 1rem;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.webhook-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.webhook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.webhook-type {
    font-weight: bold;
    color: var(--primary);
}

.webhook-time {
    color: #999;
    font-size: 0.9rem;
}

.webhook-payload-preview {
    font-size: 0.85rem;
    color: #666;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-replayed {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    padding: 1rem;
    background: var(--light);
    border-radius: 6px;
}

.detail-item label {
    display: block;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.payload-box {
    margin-bottom: 2rem;
}

.payload-box h3 {
    margin-bottom: 1rem;
}

.payload-box pre {
    background: var(--light);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85rem;
    max-height: 300px;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-controls {
        width: 100%;
    }
}
