/* Custom Fonts */
@font-face {
    font-family: 'Hadi';
    src: url('../../hadi/Hadi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Hadi Rounded';
    src: url('../../hadi/Hadi (Rounded).ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Kalpurush', Arial, sans-serif;
    background: linear-gradient(135deg, #388e3c 0%, #c62828 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Container */
.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 1050px;
    width: 100%;
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
}

/* Portrait Section */
.portrait-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.portrait-image {
    width: 320px;
    height: 320px;
    border-radius: 15px;
    object-fit: cover;
    border: 5px solid #e74c3c;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.portrait-name {
    text-align: center;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.4;
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Kalpurush', Arial, sans-serif;
    margin-bottom: 10px;
}

/* Portrait Share Buttons */
.portrait-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
}

.portrait-share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    color: white;
}

.portrait-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.portrait-share-btn i {
    font-size: 20px;
}

.portrait-share-btn.facebook {
    background: #1877f2;
}

.portrait-share-btn.twitter {
    background: #000000;
}

.portrait-share-btn.whatsapp {
    background: #25d366;
}

.portrait-share-btn.telegram {
    background: #0088cc;
}

.portrait-share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Content Section */
.content-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.header {
    text-align: left;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.language-selector label {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
}

.language-selector select {
    padding: 8px 15px;
    font-size: 14px;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', Arial, sans-serif;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: #fff5f5;
}

.language-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* Logo */
.logo {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 40px;
    width: auto;
    background: white;
    padding: 2px;
    border-radius: 4px;
}

/* Main Title */
h1 {
    color: #2c3e50;
    font-size: 28px;
    line-height: 1.5;
    font-weight: bold;
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Kalpurush', Arial, sans-serif;
}

/* Countdown */
.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-weight: bold;
    color: #2c3e50;
}

.countdown-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 48px;
    flex-wrap: wrap;
}

.countdown-seconds {
    font-size: 48px;
    color: #e74c3c;
}

/* Time Units */
.time-unit {
    display: inline-block;
    font-family: 'Hadi', Arial, sans-serif;
    transition: font-family 0.3s ease;
}

.time-unit.latin {
    font-family: 'Montserrat', Arial, sans-serif;
}

.separator {
    color: #2c3e50;
}

.time-unit:last-child {
    color: #e74c3c;
}

/* Download Section */
.download-section {
    margin-top: 30px;
    text-align: center;
}

.download-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Kalpurush', Arial, sans-serif;
}

.download-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.download-btn:active {
    transform: translateY(0);
}

/* Hidden Canvas */
#shareCanvas {
    display: none;
}

/* Tablet Responsive */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .portrait-container {
        order: -1;
    }

    .portrait-image {
        width: 200px;
        height: 200px;
    }

    .portrait-share-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .portrait-share-btn i {
        font-size: 18px;
    }

    .countdown-row {
        font-size: 36px;
        gap: 10px;
    }

    .countdown-seconds {
        font-size: 36px;
    }
    
    h1 {
        font-size: 22px;
        text-align: center;
    }

    .logo {
        justify-content: center;
    }

    .header {
        text-align: center;
    }

    .language-selector {
        justify-content: center;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .portrait-image {
        width: 160px;
        height: 160px;
    }

    .portrait-share-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .portrait-share-btn i {
        font-size: 16px;
    }

    .countdown-row {
        font-size: 28px;
        gap: 8px;
    }

    .countdown-seconds {
        font-size: 28px;
    }
    
    h1 {
        font-size: 18px;
    }

    .portrait-name {
        font-size: 14px;
    }

    .container {
        padding: 25px;
    }

    .download-btn {
        font-size: 16px;
        padding: 12px 30px;
    }
}