@font-face {
    font-family: 'SolaimanLipi';
    src: local('SolaimanLipi'), local('Solaiman Lipi');
}

@font-face {
    font-family: 'Li Shadhinata V1';
    src: url('fonts/Li Shadhinata 2.0 ANSI V1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Li Shadhinata V1';
    src: url('fonts/Li Shadhinata 2.0 ANSI V1 Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Li Shadhinata V2';
    src: url('fonts/Li Shadhinata 2.0 ANSI V2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Li Shadhinata V2';
    src: url('fonts/Li Shadhinata 2.0 ANSI V2 Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SolaimanLipi';
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F,  #2D5F3F, #1a3d2b);
    min-height: 100vh;
    color: #333;
    /* Prevent screenshots on mobile - makes screen capture difficult */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Banner Styles */
.banner-container {
    width: 100%;
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F,  #2D5F3F, #1a3d2b);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 250px;
    object-fit: contain;
    border-radius: 12px;
}

/* Countdown Section */
.countdown-section {
    width: 100%;
    background: linear-gradient(135deg, #1a3d2b 0%, #2D5F3F 50%, #1a3d2b 100%);
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.countdown-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.countdown-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Li Shadhinata V1';
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px 30px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.countdown-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.countdown-number {
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    font-family: 'SolaimanLipi';
}

.countdown-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    text-transform: none;
}

.countdown-date {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Search Section */
.search-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-section h1 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 30px;
    font-weight: 700;
    text-align: center;
    font-family: 'SolaimanLipi';
    font-style: normal;
}

/* Search Form */
.search-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.required {
    color: #e53e3e;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
    font-family: 'SolaimanLipi';
}

.form-input:focus {
    border-color: #2D5F3F;
    box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.1);
}

.form-input:disabled {
    background-color: #f7fafc;
    cursor: not-allowed;
    color: #a0aec0;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232D5F3F' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.search-button {
    width: 100%;
    padding: 15px 40px;
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F, #2D5F3F, #1a3d2b);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    font-family: 'Li Shadhinata V2';
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(45, 95, 63, 0.4);
}

.search-button:active {
    transform: translateY(0);
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2D5F3F;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Section */
.results-section {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-section h2 {
    color: #2d3748;
    font-size: 2rem;
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
    font-family: 'Li Shadhinata V2';
}

.results-count {
    text-align: center;
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 10px;
    flex-shrink: 0;
}

#resultsContainer {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Voter Card */
.voter-card {
    background: linear-gradient(135deg, #f6f9fc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.voter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F, #2D5F3F, #1a3d2b);
}

.voter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #2D5F3F;
}

/* Card Action Buttons */
.card-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Li Shadhinata V2';
}

.download-btn {
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F, #2D5F3F, #1a3d2b);
    color: white;
    flex: 1;
    min-width: 200px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 95, 63, 0.5);
    background: linear-gradient(90deg, #2D5F3F, #1a3d2b, #1a3d2b, #2D5F3F);
}

.copy-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    flex: 1;
    min-width: 200px;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.sms-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.sms-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.voter-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.voter-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.voter-id {
    font-size: 1rem;
    color: #2D5F3F;
    font-weight: 600;
}

/* Ward and Area Section */
.ward-area-section {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #e8f3ee 0%, #d4e6db 100%);
    border-radius: 10px;
    border: 2px solid #2D5F3F;
    flex-wrap: wrap;
}

.ward-info,
.area-info {
    flex: 1;
    min-width: 150px;
    color: #065f46;
    font-size: 0.95rem;
}

.ward-info strong,
.area-info strong {
    color: #047857;
    font-weight: 700;
}

.voter-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 100px;
}

.info-value {
    color: #2d3748;
    flex: 1;
}

.voting-centre {
    margin-top: 15px;
    padding: 15px;
    background: #e8f3ee;
    border-radius: 10px;
    border-left: 4px solid #2D5F3F;
}

.voting-centre-label {
    font-weight: 700;
    color: #2D5F3F;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.voting-centre-value {
    color: #2d3748;
    font-size: 1rem;
    line-height: 1.5;
}

/* No Results */
.no-results {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.no-results p {
    color: #718096;
    font-size: 1.1rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Photo Card Button Section */
.photocard-button-section {
    text-align: center;
    margin: 60px 0 40px 0;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 16px;
}

.photocard-nav-btn {
    display: inline-block;
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F, #2D5F3F, #1a3d2b);
    color: white;
    text-decoration: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(45, 95, 63, 0.3);
    transition: all 0.3s ease;
    font-family: 'Li Shadhinata V2';
}

.photocard-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(45, 95, 63, 0.4);
    background: linear-gradient(90deg, #2D5F3F, #1a3d2b, #1a3d2b, #2D5F3F);
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #6b7280;
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.back-btn:hover {
    background: #4b5563;
    transform: translateX(-3px);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.4);
}

.back-btn svg {
    transition: transform 0.3s ease;
}

.back-btn:hover svg {
    transform: translateX(-3px);
}

/* Disclaimer Section */
.disclaimer-section {
    background: linear-gradient(135deg, #2d4a36 0%, #3a5a42 50%, #2d4a36 100%);
    border: 2px solid #d4af37;
    border-radius: 16px;
    margin: 30px auto;
    max-width: 900px;
    padding: 25px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.disclaimer-container {
    text-align: center;
}

.disclaimer-text {
    color: #f5f5f5;
    font-size: 1rem;
    line-height: 1.9;
    margin: 0;
    font-weight: 400;
}

.disclaimer-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

.disclaimer-email {
    color: #4fc3f7;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(79, 195, 247, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.disclaimer-email:hover {
    color: #81d4fa;
    background: rgba(79, 195, 247, 0.3);
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: white;
    margin-top: 50px;
}

.footer p {
    margin: 5px 0;
    font-size: 1rem;
}

.footer-note {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-container {
        padding: 10px;
    }

    .banner-image {
        max-height: 180px;
    }

    .container {
        padding: 20px 15px;
    }

    .search-section {
        padding: 25px 20px;
    }

    .search-section h1 {
        font-size: 1.4rem;
        line-height: 1.4;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .search-button {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .results-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .voter-card {
        padding: 18px;
    }

    .voter-name {
        font-size: 1.25rem;
    }

    .card-actions {
        gap: 6px;
    }

    .action-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        gap: 4px;
    }

    .action-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .banner-container {
        padding: 8px;
    }

    .banner-image {
        max-height: 140px;
        border-radius: 8px;
    }

    .container {
        padding: 15px 10px;
    }

    .search-section {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .search-section h1 {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .form-input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .search-button {
        padding: 13px 25px;
        font-size: 0.95rem;
    }

    .voter-card {
        padding: 15px;
        border-radius: 12px;
    }

    .voter-name {
        font-size: 1.15rem;
    }

    .voter-id {
        font-size: 0.9rem;
    }

    .ward-area-section {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .ward-info,
    .area-info {
        font-size: 0.88rem;
        min-width: auto;
    }

    .info-row {
        flex-direction: column;
        gap: 3px;
    }

    .info-label {
        min-width: auto;
        font-size: 0.85rem;
    }

    .info-value {
        font-size: 0.9rem;
    }

    .card-actions {
        gap: 5px;
    }

    .action-btn {
        padding: 9px 10px;
        font-size: 0.8rem;
        gap: 3px;
        min-width: 90px;
    }

    .action-btn svg {
        width: 14px;
        height: 14px;
    }

    .voting-centre {
        padding: 12px;
        font-size: 0.9rem;
    }

    .voting-centre-label {
        font-size: 0.85rem;
    }

    .voting-centre-value {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .results-section h2 {
        font-size: 1.5rem;
    }

    .results-count {
        font-size: 1rem;
        padding: 12px;
    }
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%;
}

.results-table thead {
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F,  #2D5F3F, #1a3d2b);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table th {
    padding: 18px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
}

.results-table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.95rem;
}

.results-table tbody tr:hover {
    background: #e8f3ee;
}

.results-table .center-name {
    text-align: left;
    font-size: 0.9rem;
}

.voter-info-btn {
    background: linear-gradient(90deg, #1a3d2b, #2D5F3F, #2D5F3F, #1a3d2b);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'SolaimanLipi';
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.voter-info-btn:hover {
    background: #1a3d2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* A4 Card Modal */
.card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.card-modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 800px;
    width: 100%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10001;
}

.close-modal:hover {
    background: #dc2626;
}

/* A4 Card Design */
.a4-card {
    background: white;
    width: 100%;
    aspect-ratio: 1/1.414;
    border: 2px solid #0d9488;
    padding: 0;
    font-family: 'SolaimanLipi';
    position: relative;
}

.card-top-gap {
    height: 30px;
    background: white;
}

.card-header-banner {
    width: 100%;
    border-bottom: 3px solid #0d9488;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.card-slogan {
    background: white;
    padding: 15px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.6;
    border-bottom: 2px solid #e5e7eb;
}

.card-center-info {
    background: #0d9488;
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.card-voter-details {
    background: #e0f2f1;
    padding: 20px 30px;
}

.detail-row {
    padding: 8px 0;
    font-size: 1rem;
    line-height: 1.8;
}

.detail-label {
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

.card-footer-text {
    margin-top: 15px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.card-actions-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
