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

:root {
    --bg-primary: hsl(220, 30%, 96%);
    --bg-card: hsl(0, 0%, 100%);
    --text-primary: hsl(224, 56%, 16%);
    --text-secondary: hsl(220, 16%, 46%);
    
    --primary: hsl(220, 65%, 26%); /* Deep Navy Blue */
    --primary-hover: hsl(220, 65%, 20%);
    --primary-light: hsl(220, 65%, 94%);
    
    --accent: hsl(38, 92%, 50%); /* Amber / Warm Gold */
    --accent-hover: hsl(38, 92%, 44%);
    --accent-light: hsl(38, 92%, 95%);

    --success: hsl(142, 72%, 29%);
    --success-light: hsl(142, 72%, 95%);
    --error: hsl(0, 84%, 44%);
    --error-light: hsl(0, 84%, 97%);

    --border: hsl(220, 20%, 88%);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Base Card Style */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

/* Header styling */
header {
    text-align: center;
    padding: 10px 0;
}

.logo-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.logo-container svg {
    width: 50px;
    height: 50px;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 8px;
}

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

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.participant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.participant-row {
    display: flex;
    gap: 10px;
    align-items: center;
    animation: slideIn 0.3s ease-out forwards;
}

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

.input-text {
    flex: 1;
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: hsl(210, 40%, 99%);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.input-text:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--bg-card);
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-remove:hover {
    background-color: var(--error-light);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary);
    border: 2px dashed var(--primary);
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    border-style: solid;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(30, 58, 138, 0.3);
}

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

.btn-primary:disabled {
    background-color: var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* PIX Section Styling */
.pix-card {
    border-top: 4px solid var(--accent);
}

.pix-card h2 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.pix-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.pix-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.qr-code-wrapper {
    background: #fff;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.qr-code {
    width: 180px;
    height: 180px;
    display: block;
    object-fit: contain;
}

.pix-copy-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pix-key-wrapper {
    display: flex;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: hsl(210, 40%, 99%);
    overflow: hidden;
}

.input-pix {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 50px;
}

.btn-copy-icon {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-copy-icon:hover {
    color: var(--primary);
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(217, 119, 6, 0.2);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px rgba(217, 119, 6, 0.3);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 400px;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-size: 0.95rem;
    font-weight: 500;
}

.toast.success {
    border-left-color: var(--success);
    color: var(--text-primary);
}

.toast.error {
    border-left-color: var(--error);
    color: var(--text-primary);
}

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

.toast.fade-out {
    animation: toastFadeOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
