@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

:root {
    --glass-bg: rgba(28, 28, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-color: #8B5CF6;
    --accent-hover: #7C3AED;
}

body {
    background: linear-gradient(-45deg, #32325c, #16213e, #32325c, #16213e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    color: #E5E7EB;
}

.container {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.6s ease-out;
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #8B5CF6, #6366F1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9CA3AF;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="url"],
input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-sizing: border-box;
    color: #E5E7EB;
    transition: all 0.3s ease;
}

input[type="url"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: rgba(17, 24, 39, 0.9);
}

input[type="url"]::placeholder {
    color: #6B7280;
}

button, a.primary-button, a.danger-button, a.manage-trusted-button {
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.primary-button {
    width: 100%;
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.primary-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.primary-button:active {
    transform: translateY(1px);
}

.url-group {
    display: flex;
    gap: 0.5rem;
}

.url-input {
    border-radius: 0.5rem;
}

.copy-button {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: #E5E7EB;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.hidden {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: 0.25rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #8B5CF6, #6366F1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #9CA3AF;
}

#results {
    animation: fadeIn 0.6s ease-out;
}
.warning-badge {
    background: rgba(251, 146, 60, 0.2);
    border: 1px solid rgba(251, 146, 60, 0.3);
    color: #FBBF24;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.destination-url {
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    word-break: break-all;
    margin: 1rem 0;
    font-family: monospace;
    color: #E5E7EB;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.danger-button {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #E5E7EB;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.danger-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.confirm-content {
    text-align: center;
}

.description {
    color: #9CA3AF;
    margin-bottom: 1.5rem;
}

.trust-checkbox-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.4);
    border-radius: 0.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-checkbox {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--glass-border);
    border-radius: 0.3rem;
    background: rgba(17, 24, 39, 0.7);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.trust-checkbox:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.trust-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.8rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.trust-checkbox:hover {
    border-color: var(--accent-color);
}

.trust-label {
    font-size: 0.9rem;
    color: #E5E7EB;
    cursor: pointer;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
}

.trusted-domains-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.trusted-domain-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(17, 24, 39, 0.7);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.remove-domain {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-domain:hover {
    background: rgba(239, 68, 68, 0.3);
}

.manage-trusted {
    text-align: center;
    margin-top: 2rem;
}

.manage-trusted-button {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #E5E7EB;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.manage-trusted-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.empty-state {
    text-align: center;
    color: #9CA3AF;
    padding: 2rem;
}

.landing-content {
    text-align: center;
}
