:root {
    --primary-color: #E357AB;
    /* Brilliant Rose */
    --secondary-color: #8C87C9;
    /* Tropical Indigo */
    --background-color: #F5F5F5;
    /* Platinum White */
    --text-color: #122933;
    /* Dark Navy */
    --font-family: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 480px;
    /* Mobile constraint */
    height: 100%;
    position: relative;
    background: #fff;
    /* Slight contrast for container on desktop */
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

@media (max-width: 480px) {
    .app-container {
        background: var(--background-color);
        box-shadow: none;
    }
}

/* Header / Logo */
.header {
    padding: 20px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Pulse Button */
.command-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.pulse-button {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    outline: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(227, 87, 171, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 5;
}

.pulse-button:active {
    transform: scale(0.95);
    box-shadow: 0 5px 15px rgba(227, 87, 171, 0.6);
}

.mic-icon {
    font-size: 3rem;
    color: white;
}

.status-text {
    margin-top: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(227, 87, 171, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(227, 87, 171, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(227, 87, 171, 0);
    }
}

/* Toggle Switch */
.mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.mode-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--secondary-color);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--secondary-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Quote List Styling */
.quote-list {
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.quote-list h3 {
    margin-bottom: 15px;
    font-weight: 700;
}

.quote-items {
    min-height: 60px;
    margin-bottom: 15px;
}

.empty-state {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

/* Quote Footer & Export */
.quote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid var(--background-color);
    padding-top: 15px;
    margin-top: 15px;
}

.export-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-family);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(140, 135, 201, 0.3);
}

.quote-total {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-color);
    border: none;
    padding: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: 20px;
    padding: 20px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-family);
}

.form-group.row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group.row input {
    width: auto;
}

.save-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.debug-btn {
    background: none;
    border: 1px dashed #ccc;
    padding: 5px;
    cursor: pointer;
}

.upsell-notification {
    position: absolute;
    top: -200px;
    /* Hidden initially */
    left: 0;
    width: 100%;
    background-color: var(--text-color);
    /* Dark Navy for high contrast */
    color: white;
    padding: 20px;
    padding-top: 70px;
    /* Clear header space */
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.upsell-notification.active {
    top: 0;
}

.upsell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.upsell-text {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}

.strategy-btn {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(227, 87, 171, 0.4);
    transition: transform 0.2s;
}

.strategy-btn:hover {
    transform: scale(1.05);
}

.debug-btn {
    background: none;
    border: 1px dashed #ccc;
    padding: 5px;
    cursor: pointer;
}