/* BOMBA Gold Calculator - Frontend CSS */
code {
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
}


.gold-calculator-container {
    max-width: 800px;
    margin: 20px auto;
    /* background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%); */
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

/* Header Section */
.gold-calculator-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 20px;
}

.calculator-title {
    color: #d4af37;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.live-price-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.current-gold-price {
    color: #d4af37;
    font-weight: bold;
    font-size: 24px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.current-gold-price.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.price-unit {
    color: #888;
    font-size: 14px;
}

/* Main Calculator */
.calculator-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #d4af37;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.input-group input::placeholder {
    color: #666;
}

.input-group select option {
    background: #2d2d2d;
    color: #fff;
}

/* Custom Purity Input */
#custom-purity {
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

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

/* Calculation Result */
.calculation-result {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.result-main {
    text-align: center;
    margin-bottom: 20px;
}

.calculated-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.value-amount {
    color: #d4af37;
    font-size: 45px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.value-amount.updating {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

.value-label {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Action Buttons */
.copy-result-btn,
.share-result-btn {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    margin: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.copy-result-btn:hover,
.share-result-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    transform: translateY(-1px);
}

/* Result Breakdown */
.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 15px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.breakdown-label {
    color: beige;
    font-size: 1rem;
}

.breakdown-value {
    color: #d4af37;
    font-weight: 600;
    font-size: 18px;
}

/* Footer */
.calculator-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.price-update {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.update-label {
    color: #666;
}

.update-time {
    color: #d4af37;
    font-weight: 500;
}

.calculator-disclaimer {
    color: #666;
    font-size: 11px;
    text-align: right;
}

.calculator-branding {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.calculator-branding small {
    color: #666;
    font-size: 10px;
}

.calculator-branding a {
    color: #d4af37;
    text-decoration: none;
}

.calculator-branding a:hover {
    text-decoration: underline;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.2),
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    to {
        left: 100%;
    }
}

/* Notifications */
.calculator-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #d4af37;
    color: #1a1a1a;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 1000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calculator-notification:hover {
    transform: scale(1.02);
}

.calculator-notification.success {
    background: #28a745;
    color: white;
}

.calculator-notification.error {
    background: #dc3545;
    color: white;
}

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

/* Quick Actions & Modals */
.quick-actions-overlay,
.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-actions-content,
.help-modal-content {
    background: #1a1a1a;
    border: 1px solid #d4af37;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    color: #fff;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 15px;
}

.help-modal-header h3 {
    color: #d4af37;
    margin: 0;
}

.help-modal-close,
.quick-action-close {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 18px;
    cursor: pointer;
}

.quick-action-btn {
    display: block;
    width: 100%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.help-section {
    margin: 15px 0;
}

.help-section h4 {
    color: #d4af37;
    margin-bottom: 8px;
}

.help-section ul {
    margin-left: 20px;
}

.help-section li {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gold-calculator-container {
        margin: 15px;
        padding: 20px;
    }
    
    /* .calculator-title {
        font-size: 24px;
    }
    
    .current-gold-price {
        font-size: 20px;
    } */
    
    .calculator-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .value-amount {
        font-size: 36px;
    }
    
    .calculator-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .calculator-disclaimer {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gold-calculator-container {
        margin: 10px;
        padding: 15px;
    }
    
    /* .calculator-title {
        font-size: 20px;
    }
    
    .current-gold-price {
        font-size: 18px;
    }
    
    .value-amount {
        font-size: 24px;
    } */
    
    .input-group input,
    .input-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .calculation-result {
        padding: 15px;
    }
    
    /* .breakdown-item {
        font-size: 12px;
    } */
    
    .calculator-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px 15px;
    }
}


/* Print styles */
@media print {
    .gold-calculator-container {
        background: none !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .copy-result-btn,
    .share-result-btn,
    .quick-actions-overlay,
    .help-modal-overlay {
        display: none !important;
    }
    
    .calculator-title {
        color: #000 !important;
    }
    
    .current-gold-price,
    .value-amount,
    .breakdown-value {
        color: #000 !important;
    }
}

.countdown-value.market-closed {
    color: #dc3545;
    font-weight: bold;
}

.countdown-timer.market-closed {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
}










/* BOMBA Gold Calculator - Frontend CSS - FIXED VERSION */
/* BOMBA Gold Calculator - Frontend CSS - COMPLETE FIXED VERSION */

.gold-calculator-container {
    max-width: 800px;
    margin: 20px auto;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

/* Header Section */
.gold-calculator-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 20px;
}



/* Gold icon namiesto emoji */
.calculator-title::before {
    content: "◉";
    color: #d4af37;
    margin-right: 10px;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.live-price-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 18px;
}

.current-gold-price {
    color: #d4af37;
    font-weight: bold;
    font-size: 24px;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

.current-gold-price.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.price-unit {
    color: #888;
    font-size: 14px;
}

/* Main Calculator */
.calculator-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #d4af37;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    padding: 12px 15px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.input-group input::placeholder {
    color: #666;
}

.input-group select option {
    background: #2d2d2d;
    color: #fff;
}

/* Custom Purity Input */
#custom-purity {
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

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

/* Calculation Result */
.calculation-result {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.result-main {
    text-align: center;
    margin-bottom: 20px;
}

.calculated-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}



.value-label {
    color: #888;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Action Buttons */
.copy-result-btn,
.share-result-btn {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    margin: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
}

/* Symboly namiesto emoji */
.copy-result-btn::before {
    content: "⧉ ";
    margin-right: 5px;
}

.share-result-btn::before {
    content: "⤴ ";
    margin-right: 5px;
}

.copy-result-btn:hover,
.share-result-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    transform: translateY(-1px);
}

/* Result Breakdown */
.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 15px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}



/* Footer */
.calculator-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.price-update {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    flex-wrap: wrap;
}

.update-label {
    color: #666;
}

.update-time {
    color: #d4af37;
    font-weight: 500;
}

/* Countdown Timer Styling */
.countdown-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.countdown-timer:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.countdown-label {
    color: #888;
    font-size: 10px;
}

.countdown-value {
    color: #d4af37;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    min-width: 45px;
    text-align: center;
}

.countdown-value.warning {
    color: #ffc107;
    animation: blink 1s infinite;
}

.countdown-value.urgent {
    color: #dc3545;
    animation: pulse-urgent 0.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

@keyframes pulse-urgent {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.calculator-disclaimer {
    color: #666;
    font-size: 11px;
    text-align: right;
}

.calculator-branding {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.calculator-branding small {
    color: #666;
    font-size: 10px;
}

.calculator-branding a {
    color: #d4af37;
    text-decoration: none;
}

.calculator-branding a:hover {
    text-decoration: underline;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.2),
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    to {
        left: 100%;
    }
}

/* Notifications */
.calculator-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #d4af37;
    color: #1a1a1a;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 1000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calculator-notification:hover {
    transform: scale(1.02);
}

.calculator-notification.success {
    background: #28a745;
    color: white;
}

.calculator-notification.error {
    background: #dc3545;
    color: white;
}

.calculator-notification.success::before {
    content: "✓ ";
    margin-right: 5px;
}

.calculator-notification.error::before {
    content: "✗ ";
    margin-right: 5px;
}

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

/* Quick Actions & Modals */
.quick-actions-overlay,
.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-actions-content,
.help-modal-content {
    background: #1a1a1a;
    border: 1px solid #d4af37;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    color: #fff;
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 15px;
}

.help-modal-header h3 {
    color: #d4af37;
    margin: 0;
}

.help-modal-close,
.quick-action-close {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 18px;
    cursor: pointer;
}

.quick-action-btn {
    display: block;
    width: 100%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
}

.quick-action-btn[data-action="clear"]::before {
    content: "⌫ ";
    margin-right: 8px;
}

.quick-action-btn[data-action="refresh"]::before {
    content: "⟲ ";
    margin-right: 8px;
}

.quick-action-btn[data-action="help"]::before {
    content: "? ";
    margin-right: 8px;
}

.help-section {
    margin: 15px 0;
}

.help-section h4 {
    color: #d4af37;
    margin-bottom: 8px;
}

.help-section ul {
    margin-left: 20px;
}

.help-section li {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gold-calculator-container {
        margin: 15px;
        padding: 20px;
    }
    
    /* .calculator-title {
        font-size: 24px;
    }
    
    .current-gold-price {
        font-size: 20px;
    } */
    
    .calculator-main {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* .value-amount {
        font-size: 28px;
    }
     */
    .calculator-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .calculator-disclaimer {
        text-align: center;
    }
    
    .price-update {
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .gold-calculator-container {
        margin: 10px;
        padding: 15px;
    }
    
    /* .calculator-title {
        font-size: 20px;
    }
    
    .current-gold-price {
        font-size: 18px;
    }
    
    .value-amount {
        font-size: 24px;
    } */
    
    .input-group input,
    .input-group select {
        padding: 10px 12px;
        /* font-size: 14px; */
    }
    
    .calculation-result {
        padding: 15px;
    }
    
    /* .breakdown-item {
        font-size: 12px;
    } */
    
    .calculator-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 10px 15px;
    }
    
    .countdown-timer {
        /* font-size: 10px; */
        padding: 3px 6px;
    }
    
    .countdown-value {
        min-width: 35px;
        /* font-size: 10px; */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .gold-calculator-container {
        border: 2px solid #d4af37;
    }
    
    .input-group input,
    .input-group select {
        border: 2px solid #d4af37;
    }
}

/* Light theme support */
/* @media (prefers-color-scheme: light) {
    .gold-calculator-container {
        background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
        color: #1a1a1a;
        border: 1px solid #d4af37;
    }
    
    .value-amount {
        color: #2e7d32;
    }
    
    .input-group input,
    .input-group select {
        background: rgba(0, 0, 0, 0.05);
        color: #333;
        border-color: rgba(212, 175, 55, 0.5);
    }
    
    .breakdown-label {
        color: beige;
    }
    
    .update-label,
    .calculator-disclaimer {
        color: #888;
    }
    
    .quick-actions-content,
    .help-modal-content {
        background: #fff;
        color: #333;
    }
} */


/* Print styles */
@media print {
    .gold-calculator-container {
        background: none !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .copy-result-btn,
    .share-result-btn,
    .quick-actions-overlay,
    .help-modal-overlay,
    .countdown-timer {
        display: none !important;
    }
    
    .calculator-title {
        color: #000 !important;
    }
    
    .current-gold-price,
    .value-amount,
    .breakdown-value {
        color: #000 !important;
    }
}


