/* Base styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --text-color: #2c3e50;
    --light-text: #7f8c8d;
    --background: #f8f9fa;
    --border-color: #e0e0e0;
}
object {
    overflow: hidden;
    width: 0;
    height: 0;
    opacity: 0;
}

/* Reset default margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .logo {
        font-size: 1.5rem;
        font-weight: bold;
        text-decoration: none;
    }

    nav {
        display: flex;
        gap: 2rem;
        list-style: none;

        a {
            color: white;
            text-decoration: none;
            font-size: 1rem;
            position: relative;
            padding: 0.75rem 1.5rem;
            transition: color 0.1s ease;

            &::after {
                content: '';
                position: absolute;
                bottom: 0;
                left: 50%;
                width: 0;
                height: 1px;
                background-color: white;
                transition: all 0.1s ease;
            }

            &:hover {
                color: white;
            }

            &:hover::after {
                width: 100%;
                left: 0;
                height: 1px;
            }

            &.active {
                color: white;
                font-weight: 500;
            }

            &.active::after {
                width: 100%;
                left: 0;
                height: 4px;
            }

            &.current {
                color: white;
                font-weight: 500;
            }

            &.current::after {
                width: 100%;
                left: 0;
                height: 4px;
            }
        }
    }

    .login-btn {
        background: transparent;
        border: 2px solid white;
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 4px;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 500;

        &:hover {
            background-color: white;
            color: var(--text-color);
        }
    }
}

/* Main content */
main {
    flex: 1;
    max-width: 100vw;
    margin: 0 auto;
    padding: 2rem;
    width: -webkit-fill-available;

    h1 {
        color: var(--text-color);
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    p {
        color: var(--light-text);
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 3rem;
    }
}

/* Demo Section */
.demo-section {
    background: var(--background);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;

    h2 {
        color: var(--text-color);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--border-color);
    }

    .input-field {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--border-color);
        border-radius: 4px;
        font-size: 1rem;
        margin-bottom: 1rem;
        transition: border-color 0.3s ease;

        &:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }
    }

    .output-text {
        color: var(--text-color);
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .add-btn {
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 4px;
        font-size: 1rem;
        cursor: pointer;
        transition: background 0.3s ease;
        display: block;
        margin: 0 auto;

        &:hover {
            background: var(--secondary-color);
        }
    }
}

/* Items List */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;

    .item-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        background: white;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

        .item-text {
            color: var(--text-color);
            font-size: 1rem;
        }

        .delete-btn {
            background: #e74c3c;
            color: white;
            border: none;
            padding: 0.5rem 1rem;
            border-radius: 4px;
            font-size: 0.9rem;
            cursor: pointer;
            transition: background 0.3s ease;

            &:hover {
                background: #c0392b;
            }
        }
    }
}

/* Footer styles */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
    position: sticky;
    bottom: 0;
    width: 100%;
    z-index: 1000;

    p {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    header, footer {
        padding: 1rem;
    }

    main {
        padding: 1rem;
    }

    header nav {
        gap: 1rem;
    }

    .demo-section {
        padding: 1rem;
    }
}