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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ffffff;
    --accent-hover: #e0e0e0;
    --error: #ff3b3b;
    --success: #00ff88;
    --border: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-icon {
    font-size: 36px;
}

.logo h1 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Input Section */
.input-section {
    margin-bottom: 60px;
}

.input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.url-input {
    flex: 1;
    padding: 20px 24px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.url-input:focus {
    border-color: var(--accent);
}

.url-input::placeholder {
    color: var(--text-secondary);
}

.shorten-btn {
    padding: 20px 40px;
    background-color: var(--accent);
    color: var(--bg-primary);
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.shorten-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.shorten-btn:active {
    transform: translateY(0);
}

.shorten-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-arrow {
    font-size: 20px;
    transition: transform 0.2s;
}

.shorten-btn:hover .btn-arrow {
    transform: translateX(2px);
}

.error-message {
    color: var(--error);
    font-size: 14px;
    font-weight: 500;
    padding-left: 4px;
    min-height: 20px;
}

/* Result Section */
.result-section {
    margin-bottom: 60px;
    animation: slideDown 0.3s ease-out;
}

.result-section.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border);
    padding: 32px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.success-icon {
    width: 32px;
    height: 32px;
    background-color: var(--success);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

.result-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.url-display {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.short-url {
    flex: 1;
    padding: 16px 20px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Monaco', 'Courier New', monospace;
    outline: none;
}

.visit-btn,
.copy-btn {
    padding: 16px 28px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.visit-btn:hover,
.copy-btn:hover {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.visit-icon,
.copy-icon {
    font-size: 16px;
}

.copy-feedback {
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
    padding-left: 4px;
    animation: fadeIn 0.3s;
}

.copy-feedback.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.feature {
    padding: 32px 24px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border);
    transition: transform 0.2s, border-color 0.2s;
}

.feature:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.feature h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 30px 16px;
    }

    .logo h1 {
        font-size: 32px;
    }

    .tagline {
        font-size: 16px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .shorten-btn {
        justify-content: center;
        padding: 18px 32px;
    }

    .url-display {
        flex-direction: column;
    }

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

    .result-card {
        padding: 24px;
    }
}
