/**
 * BUDI95 - Kalkulator Subsidi Petrol Malaysia
 * Stylesheet v2.0.0
 * 
 * @author Microtech.Store
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('https://isaham.sgp1.digitaloceanspaces.com/blog/Thumbnail-syarikat-minyak-yang-bertapak-di-Malaysia.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== Main Container ===== */
.station-container {
    max-width: 950px;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

/* ===== Header ===== */
.header {
    background: linear-gradient(135deg, #00a651 0%, #008844 100%);
    padding: 40px 30px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: shimmer 20s linear infinite;
}

@keyframes shimmer {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50%, 50%); }
}

.logo-section {
    position: relative;
    z-index: 1;
}

.header-image {
    display: none;
}

.fuel-icon {
    font-size: 50px;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

h1 {
    color: white;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* ===== Price Banner ===== */
.price-banner {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    padding: 25px 30px;
    border-bottom: 3px solid #ffcd00;
}

.price-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.price-banner-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-banner-title h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.price-banner-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.price-date {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00a651, #008844);
    color: white;
    border: 2px solid #00ff88;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 166, 81, 0.5);
    background: linear-gradient(135deg, #00c462, #00a651);
}

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

.refresh-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.refresh-icon {
    display: inline-block;
    transition: transform 0.3s;
}

.refresh-btn.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

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

.price-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.price-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border-top: 3px solid #444;
}

.price-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
}

.price-card.budi95 { border-top-color: #00ff88; }
.price-card.ron95 { border-top-color: #ff9500; }
.price-card.ron97 { border-top-color: #007aff; }
.price-card.diesel-card { border-top-color: #ff3b30; }
.price-card.diesel-east { border-top-color: #af52de; }

.price-card-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.price-card-value {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

.price-card-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.price-card-badge.subsidi {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.price-card-badge.retail {
    background: rgba(255, 205, 0, 0.15);
    color: #ffcd00;
    border: 1px solid rgba(255, 205, 0, 0.25);
}

.price-banner-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.source-badge {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.last-updated {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
}

@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); background: rgba(0, 255, 136, 0.15); }
    100% { transform: scale(1); }
}

/* ===== Pump Display / Calculator ===== */
.pump-display {
    background: #1a1a1a;
    padding: 40px 30px;
    border-bottom: 5px solid #ffcd00;
}

.digital-display {
    background: #0a0a0a;
    border: 3px solid #333;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

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

label {
    display: block;
    color: #ffcd00;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="number"] {
    width: 100%;
    padding: 18px;
    font-size: 28px;
    font-weight: bold;
    background: #1a1a1a;
    border: 3px solid #00a651;
    border-radius: 10px;
    color: #00ff88;
    text-align: center;
    font-family: 'Courier New', monospace;
}

input[type="number"]:focus {
    outline: none;
    border-color: #ffcd00;
    box-shadow: 0 0 20px rgba(255, 205, 0, 0.3);
}

/* ===== Fuel Selector ===== */
.fuel-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.fuel-option {
    background: #2a2a2a;
    border: 3px solid #444;
    border-radius: 10px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.fuel-option:hover {
    transform: translateY(-3px);
    border-color: #ffcd00;
}

.fuel-option.active {
    background: linear-gradient(135deg, #00a651, #008844);
    border-color: #ffcd00;
    transform: scale(1.05);
}

.fuel-type {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.fuel-price {
    color: #ffcd00;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.subsidy-badge {
    display: inline-block;
    background: #ff4444;
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-top: 5px;
    font-weight: bold;
}

/* ===== Calculate Button ===== */
.calculate-btn {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient(135deg, #00a651, #008844);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(0, 166, 81, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 166, 81, 0.5);
}

.calculate-btn:active {
    transform: translateY(-1px);
}

/* ===== Results Section ===== */
.results {
    padding: 30px;
    display: none;
}

.results.show {
    display: block;
    animation: slideIn 0.5s ease;
}

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

.result-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #00a651;
}

.result-header h2 {
    color: #00a651;
    font-size: 24px;
    margin-bottom: 5px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #00a651;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s;
}

.result-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-label {
    color: #666;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.result-value {
    color: #1a1a1a;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.highlight-card {
    background: linear-gradient(135deg, #00a651 0%, #008844 100%);
    border-left: 5px solid #ffcd00;
    grid-column: 1 / -1;
}

.highlight-card .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.highlight-card .result-value {
    color: white;
    font-size: 32px;
}

/* ===== Video Section ===== */
.video-section {
    background: #f8f9fa;
    padding: 30px;
    border-top: 3px solid #00a651;
}

.video-header {
    text-align: center;
    margin-bottom: 25px;
}

.video-header h3 {
    color: #00a651;
    font-size: 22px;
    margin-bottom: 10px;
}

.video-header p {
    color: #666;
    font-size: 14px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-card-header {
    background: linear-gradient(135deg, #00a651, #008844);
    padding: 15px;
    text-align: center;
}

.video-card-header h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 5px;
}

.video-card-body {
    padding: 20px;
    text-align: center;
}

.video-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #ff0050, #ff4444);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(255, 0, 80, 0.3);
}

.video-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 0, 80, 0.4);
}

.video-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

/* ===== Brand Footer ===== */
.brand-footer {
    background: #2a2a2a;
    padding: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.brand-logo {
    font-size: 14px;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    opacity: 0.9;
}

.petronas { background: #00a651; color: white; }
.shell { background: #fbce07; color: #dd1d21; }
.petron { background: #0066b2; color: white; }
.caltex { background: #e31837; color: white; }
.bhpetrol { background: #003087; color: white; }

/* ===== Copyright ===== */
.copyright {
    background: #1a1a1a;
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}

.copyright a {
    color: #00a651;
    text-decoration: none;
    font-weight: bold;
}

.copyright a:hover {
    color: #00ff88;
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #00a651, #008844);
}

.toast.error {
    background: linear-gradient(135deg, #ff3b30, #cc2d25);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-image {
        max-width: 100%;
    }

    h1 {
        font-size: 24px;
    }

    .fuel-selector {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .price-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-card:last-child {
        grid-column: span 2;
    }

    .price-banner-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-banner-meta {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .price-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-card-value {
        font-size: 18px;
    }
}
