* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007AFF;
    --primary-hover: #0051D5;
    --primary-light: #E3F2FD;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --danger-color: #FF3B30;
    --background: #F2F2F7;
    --surface: #FFFFFF;
    --surface-secondary: #F9F9F9;
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;
    --border-color: #E5E5EA;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    --spacing-3xl: 96px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.hero {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg) var(--spacing-2xl);
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.1;
}

.subtitle {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.description-card {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(88, 86, 214, 0.08) 100%);
    border: 1px solid rgba(0, 122, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl) var(--spacing-lg);
    margin: var(--spacing-xl) auto var(--spacing-2xl);
    max-width: 800px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.description-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.25);
}

.description {
    font-size: 19px;
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 400;
    margin: 0;
    text-align: center;
    letter-spacing: -0.01em;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-2xl);
}

.feature-card {
    background: var(--surface);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card h2,
.feature-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.6;
    flex: 1;
}

.auth-card {
    max-width: 400px;
    margin: 60px auto;
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.auth-card h1 {
    font-size: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.form-card {
    max-width: 800px;
    margin: 20px auto;
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    min-height: 50px;
    min-width: 140px;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--surface-secondary);
    border-color: var(--text-tertiary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #D70015;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-remove {
    background: var(--danger-color);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-remove:hover {
    background: #D70015;
}

.error {
    background: #FFEBEE;
    color: var(--danger-color);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.header h1 {
    font-size: 32px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.entries-list {
    display: grid;
    gap: 20px;
}

.entry-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.entry-header h3 {
    font-size: 24px;
    color: var(--text-primary);
}

.entry-short-id {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-copy:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-copy.copied {
    background: var(--success-color);
}

.btn-copy .copy-icon {
    font-size: 16px;
}

.btn-copy .copy-text {
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #D4F4DD;
    color: #1D7D2F;
}

.platform-urls {
    margin: 16px 0;
}

.platform-url {
    padding: 8px 12px;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.platform-url .platform {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.platform-url .device {
    display: inline-block;
    padding: 2px 8px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.platform-url a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.platform-url a:hover {
    text-decoration: underline;
}

.default-url {
    margin: 12px 0;
    padding: 8px 12px;
    background: #FFF3CD;
    border-radius: 8px;
    font-size: 14px;
}

.default-url a {
    color: var(--primary-color);
    text-decoration: none;
}

.no-urls {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
}

.entry-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.entry-actions .btn,
.entry-actions form {
    flex-shrink: 0;
}

.entry-actions .btn {
    min-width: 100px;
    text-align: center;
}

.entry-actions form button {
    min-width: 100px;
}

.platform-url-row {
    display: grid;
    grid-template-columns: 2fr 3fr auto;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.platform-url-row select,
.platform-url-row input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filters-form {
    margin-bottom: 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.filters-grid .form-group:last-child {
    display: flex;
    align-items: flex-end;
}

.btn-filter {
    width: 100%;
    padding: 12px 24px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.charts-grid .analytics-card {
    min-height: 300px;
}

.charts-grid .analytics-card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.charts-grid canvas {
    max-height: 300px;
}

.analytics-card {
    background: var(--surface);
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.table-container {
    overflow-x: auto;
    margin-top: 24px;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.analytics-table th {
    background: var(--background);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.analytics-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.analytics-table tr:hover {
    background: var(--background);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state a {
    color: var(--primary-color);
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

.use-cases,
.how-it-works {
    margin-top: var(--spacing-3xl);
    padding: var(--spacing-xl) var(--spacing-lg);
}

.use-cases h2,
.how-it-works h2 {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.step-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    min-height: 240px;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.step-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.step-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 122, 255, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.step-card:hover::before {
    opacity: 1;
}

.step-card:hover::after {
    opacity: 1;
}

.step-icon-wrapper {
    position: relative;
    margin-bottom: var(--spacing-lg);
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.step-number {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4), 0 4px 8px rgba(0, 122, 255, 0.2);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover .step-number {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(0, 122, 255, 0.5), 0 6px 12px rgba(0, 122, 255, 0.3);
}

.step-icon {
    font-size: 48px;
    line-height: 1;
    filter: grayscale(0.3);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.step-card:hover .step-icon {
    filter: grayscale(0);
    transform: scale(1.15);
}

.step-content {
    flex: 1;
    width: 100%;
    position: relative;
    z-index: 2;
}

.step-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-content p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
}

.step-card-1 {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.step-card-2 {
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.step-card-3 {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.step-card-4 {
    background: linear-gradient(135deg, rgba(88, 86, 214, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.step-card-5 {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.03) 0%, rgba(255, 255, 255, 0.98) 100%);
}

footer {
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-3xl);
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.step-card {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.step-card:nth-child(1) {
    animation-delay: 0.1s;
}

.step-card:nth-child(2) {
    animation-delay: 0.2s;
}

.step-card:nth-child(3) {
    animation-delay: 0.3s;
}

.step-card:nth-child(4) {
    animation-delay: 0.4s;
}

.step-card:nth-child(5) {
    animation-delay: 0.5s;
}

.step-number {
    animation: pulse 3s ease-in-out infinite;
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.2);
    z-index: -1;
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.step-card:hover .step-number {
    animation: none;
}

.step-card:hover .step-number::after {
    animation: none;
    opacity: 0;
}

.feature-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.feature-card:nth-child(1) {
    animation-delay: 0.05s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.15s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(5) {
    animation-delay: 0.25s;
}

.feature-card:nth-child(6) {
    animation-delay: 0.3s;
}

@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }

    .hero {
        padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
    }

    .hero h1 {
        font-size: 40px;
        margin-bottom: var(--spacing-md);
    }

    .subtitle {
        font-size: 24px;
    }

    .description-card {
        padding: var(--spacing-lg);
        margin: var(--spacing-lg) auto var(--spacing-xl);
    }

    .description {
        font-size: 17px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-top: var(--spacing-xl);
    }

    .feature-card {
        padding: var(--spacing-lg);
    }

    .feature-card h2,
    .feature-card h3 {
        font-size: 20px;
    }

    .feature-card p {
        font-size: 16px;
    }

    .use-cases,
    .how-it-works {
        margin-top: var(--spacing-2xl);
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .use-cases h2,
    .how-it-works h2 {
        font-size: 32px;
        margin-bottom: var(--spacing-xl);
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .step-card {
        padding: var(--spacing-xl);
        min-height: 200px;
    }

    .step-icon-wrapper {
        margin-bottom: var(--spacing-md);
    }

    .step-number {
        width: 64px;
        height: 64px;
        font-size: 28px;
        border-radius: 16px;
    }

    .step-icon {
        font-size: 40px;
    }

    .step-content h3 {
        font-size: 22px;
        margin-bottom: var(--spacing-sm);
    }

    .step-content p {
        font-size: 16px;
    }

    footer {
        padding: var(--spacing-lg) var(--spacing-md);
        font-size: 14px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .platform-url-row {
        grid-template-columns: 1fr;
    }

    .entry-actions {
        flex-direction: column;
    }

    .entry-actions .btn {
        width: 100%;
    }

    .analytics-table {
        font-size: 12px;
    }

    .analytics-table th,
    .analytics-table td {
        padding: 8px;
    }
}

