:root {
    --primary-green: #4CAF50;
    --dark-green: #2e7d32;
    --brown: #795548;
    --white: #ffffff;
    --orange: #FF9800;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: var(--white);
    min-height: 100vh;
}

.header {
    background: linear-gradient(to right, #8b5e34, #6d4c41);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow-color);
    font-size: 1.8rem;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.messenger-btn {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #ffffff, #f1f1f1);
    color: #6d4c41;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.messenger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.messenger-btn .icon {
    font-size: 1.2rem;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    color: #333;
    box-shadow: 0 8px 16px var(--shadow-color);
}

.measurement-img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform 0.3s ease;
}

.measurement-img:hover {
    transform: scale(1.02);
}

.input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 600;
    color: #333;
}

input {
    padding: 1rem;
    border: 2px solid var(--brown);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

button {
    padding: 1.2rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

button:hover::before {
    left: 100%;
}

.calculate-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.reset-btn {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 15px;
    text-align: center;
}

.results p {
    font-size: 1.1rem;
    margin-top: 1rem;
    color: #444;
}

.min-yield, .max-yield {
    font-weight: 600;
    color: #2ecc71;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(46, 204, 113, 0.1);
}

#weightResult {
    color: #2ecc71;
    font-weight: 600;
    font-size: 1.2rem;
}

.progress-bar {
    height: 25px;
    background: #e0e0e0;
    border-radius: 12.5px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary-green), #45a049);
    transition: width 0.8s ease-in-out;
}

.info-section {
    margin-top: 4rem;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.info-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tip-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid rgba(46, 204, 113, 0.1);
}

.tip-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.tip-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.3);
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.tip-card h3 {
    color: #2ecc71;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tip-card p {
    color: #666;
    line-height: 1.6;
}

.bengali-explanation {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bengali-explanation h3 {
    color: #2ecc71;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.formula-box {
    background: rgba(46, 204, 113, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 1.2rem;
    color: #27ae60;
    font-weight: 600;
}

.bengali-explanation p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #444;
}

.reliability-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.reliability-section h4 {
    color: #2ecc71;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.reliability-section ul {
    list-style: none;
    padding: 0;
}

.reliability-section li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.reliability-section li.positive {
    color: #27ae60;
}

.reliability-section li.negative {
    color: #e74c3c;
}

.note {
    background: rgba(230, 126, 34, 0.1);
    padding: 1rem;
    border-radius: 10px;
    color: #d35400;
    font-style: italic;
}

/* Responsive Design Updates */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }

    .tips-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }

    .tips-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        font-size: 1.3rem;
    }

    .messenger-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        width: 80%;
        margin: 0 auto;
    }

    .button-group {
        grid-template-columns: 1fr;
    }

    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .tip-card {
        padding: 1.5rem;
    }

    .bengali-explanation {
        padding: 1.5rem;
    }
    
    .bengali-explanation h3 {
        font-size: 1.4rem;
    }
    
    .formula-box {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .reliability-section {
        padding: 1.2rem;
    }
}

@media (max-width: 576px) {
    .container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .header {
        font-size: 1.2rem;
        padding: 0.8rem;
    }

    .messenger-btn {
        width: 100%;
        font-size: 0.8rem;
    }

    .input-group {
        gap: 1rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .tip-card {
        padding: 1.2rem;
    }

    .tip-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .tip-card h3 {
        font-size: 1.1rem;
    }

    .tip-card p {
        font-size: 0.9rem;
    }

    .bengali-explanation {
        padding: 1rem;
    }

    .bengali-explanation h3 {
        font-size: 1.2rem;
    }

    .formula-box {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .bengali-explanation p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .reliability-section li {
        font-size: 0.9rem;
        padding-left: 1.5rem;
    }
}

/* For very small devices */
@media (max-width: 360px) {
    .header {
        font-size: 1.1rem;
    }

    .container {
        margin: 0.3rem;
        padding: 0.8rem;
    }

    input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    button {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .results h3 {
        font-size: 1.1rem;
    }

    .progress-bar {
        height: 20px;
    }

    .tip-card {
        padding: 1rem;
    }
}

/* For landscape orientation on mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
    .header {
        position: relative;
    }

    .container {
        margin-top: 1rem;
    }

    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For high-density (retina) displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .measurement-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* For dark mode preferences */
@media (prefers-color-scheme: dark) {
    .container,
    .tip-card,
    .bengali-explanation {
        background: rgba(255, 255, 255, 0.98);
    }

    .formula-box {
        background: rgba(46, 204, 113, 0.15);
    }
}

/* For users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.developer-info {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    border-radius: 15px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.developer-info h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.developer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.developer-basic {
    flex: 1;
    min-width: 300px;
}

.developer-basic p {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.developer-basic i {
    width: 20px;
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-link.facebook:hover { background: #1877f2; color: white; }
.social-link.twitter:hover { background: #1da1f2; color: white; }
.social-link.instagram:hover { 
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
    color: white;
}
.social-link.linkedin:hover { background: #0077b5; color: white; }
.social-link.github:hover { background: #333; color: white; }

@media (max-width: 768px) {
    .developer-info {
        padding: 1.5rem;
    }

    .developer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .developer-basic {
        min-width: 100%;
    }

    .social-links {
        justify-content: center;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .developer-info h3 {
        font-size: 1.5rem;
    }

    .developer-basic p {
        font-size: 1rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
} 