/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    font-size: 1.2em;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Background Cards */
.cards-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    opacity: 0.3;
    overflow: hidden;
}

.donor-card {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 15px;
    padding: 15px;
    color: white;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    transition: all 0.3s ease;
    animation: float 6s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.donor-card:nth-child(odd) {
    transform: rotate(2deg);
}

.donor-card:nth-child(3n) {
    animation-delay: -2s;
}

.donor-card:nth-child(5n) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
}

.donor-card:nth-child(odd) {
    animation: float 6s ease-in-out infinite;
}

@keyframes floatOdd {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* Card Colors */
.donor-card.green {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #1b5e20;
}

.donor-card.yellow {
    background: linear-gradient(135deg, #FFC107 0%, #FF8F00 100%);
    color: #e65100;
}

.donor-card.red {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
    color: white;
}

.donor-card.custom {
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    color: white;
    border: 3px solid gold;
    position: relative;
}

.donor-card.custom::before {
    content: '👑';
    position: absolute;
    top: -10px;
    right: -10px;
    background: gold;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.donor-card .donor-name {
    font-size: 1.1em;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.donor-card .donation-text {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Main Container */
.main-container {
    position: relative;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: flex;
    position: relative;
    flex-direction: column;

    gap: 30px;
}

/* Main Button */
.main-button {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.main-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.main-button:hover::before {
    left: 100%;
}

.main-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.6);
}

.main-button:active {
    transform: translateY(0);
}

/* Bilau Container */
.bilau-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bilau-wrapper {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    padding: 20px;
    border: 3px dashed rgba(255, 255, 255, 0.3);

}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bilau-gif {
    max-width: 300px;
    max-height: 300px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
}

.bilau-gif:hover {
    transform: scale(1.1);
}

/* Current Size Display */
.current-size {
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.size-label {
    display: block;
    font-size: 1.2em;
    margin-bottom: 10px;
    opacity: 0.8;
}

.size-value {
    font-size: 3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8)); }
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #FF5722);
    border-radius: 5px;
    transition: width 1s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Sidebar */
.sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    max-width: 300px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.goals-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goal-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
}

.goal-item.unlocked {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

.goal-item.active {
    background: rgba(255, 193, 7, 0.3);
    border-color: #FFC107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

.goal-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.goal-item:hover:not(.locked) {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.2);
}

.goal-preview {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unknown-preview {
    font-size: 2em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

.goal-info h4 {
    margin-bottom: 5px;
    font-size: 1.1em;
}

.goal-size {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    margin: 15% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2em;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.7;
}

/* Donation Form */
.donation-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.amount-input {
    display: flex;
    align-items: center;
    position: relative;
}

.currency {
    position: absolute;
    left: 15px;
    color: #666;
    font-weight: 600;
    z-index: 1;
}

.amount-input input {
    padding-left: 35px;
}

.form-note {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.form-note.premium {
    color: #FF6B35;
    font-weight: 600;
}

.premium-fields {
    border: 2px dashed #FF6B35;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    background: rgba(255, 107, 53, 0.05);
    animation: slideDown 0.3s ease;
}

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

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* Payment Modal Content */
.payment-content {
    padding: 30px;
    text-align: center;
}

.success-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.payment-info {
    color: #333;
    font-size: 1.1em;
    line-height: 1.6;
}

/* QR Modal Content */
.qr-content {
    padding: 30px;
    text-align: center;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 15px;
    border: 2px solid #e1e5e9;
}

.pix-info {
    margin: 20px 0;
}

.pix-code {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.pix-code input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9em;
    background: #f8f9fa;
}

.copy-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.problems-btn {
    background: transparent;
    color: #FF6B35;
    border: 2px solid #FF6B35;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.problems-btn:hover {
    background: #FF6B35;
    color: white;
}

.payment-value {
    background: rgba(102, 126, 234, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 1.2em;
    color: #333;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.3s ease;
    max-width: 300px;
    position: relative;
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #F44336;
}

.toast.warning {
    background: #FF9800;
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.blur {
    filter: blur(2px);
    pointer-events: none;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

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