@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-bg: linear-gradient(135deg, #667eea 0%, #7b49ad 100%);
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-color: #2d3748;
    --accent-color: #667eea;
    --danger-color: #e53e3e;
    --success-color: #38a169;
    --border-radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--primary-bg);
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

/* Auth Container (Login/Signup) */
.auth-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(10px);
    margin-top: 2rem;
}

.auth-container h1 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Home Layout */
.home-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header-card {
    background: var(--card-bg);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-weight: 500;
}

.logout-btn {
    color: var(--danger-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--danger-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: var(--danger-color);
    color: white;
}

/* Generator Card */
.generator-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    backdrop-filter: blur(10px);
}

.generator-card h1 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.url-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: border-color 0.2s;
    width: 100%;
    max-width: 400px;
}

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

button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.generated-link {
    background: #ebf8ff;
    padding: 1rem;
    border-radius: 8px;
    color: #2b6cb0;
    font-weight: 500;
    margin-top: 1rem;
    display: inline-block;
}

/* Table Card */
.table-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.table-card h2 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

tr:hover {
    background: #f7fafc;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.delete-btn {
    background: var(--danger-color);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Checkbox Styles */
input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

/* Responsiveness */
@media (max-width: 768px) {
    .header-card {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    body {
        padding: 1rem;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Delete Account Button */
.delete-account-btn {
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-account-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-1px);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 440px;
    width: 90%;
    text-align: center;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal h2 {
    margin-bottom: 1rem;
    color: var(--danger-color);
}

.modal p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-cancel-btn {
    background: #e2e8f0;
    color: var(--text-color);
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.modal-cancel-btn:hover {
    background: #cbd5e0;
}

.modal-confirm-btn {
    background: var(--danger-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.modal-confirm-btn:hover {
    background: #c53030;
    transform: translateY(-1px);
}

/* Background Animation */
.area {
    background: #4e54c8;
    background: -webkit-linear-gradient(to left, #8f94fb, #4e54c8);
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    animation: animate 25s linear infinite;
    bottom: -150px;
}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}