/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    padding: 1rem 0;
}

nav h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

nav p {
    color: #718096;
    font-size: 0.9rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: #718096;
    font-size: 1rem;
}

/* Form Styles */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.input-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tip Percentage Section */
.tip-percentage-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-percentage-section label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.tip-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tip-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tip-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.tip-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.custom-tip {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-tip label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.custom-tip input {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Split Section */
.split-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.split-section label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.split-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.split-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.split-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.split-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.custom-split {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-split label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.custom-split input {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Calculate Button */
.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

/* Result Section */
.result-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.result-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.result-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.result-value.total {
    color: #667eea;
    font-size: 1.4rem;
}

/* Tip Guidelines */
.tip-guidelines {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tip-guidelines h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guideline-item {
    background: #f7fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.guideline-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.guideline-item ul {
    list-style: none;
    padding: 0;
}

.guideline-item li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.guideline-item li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer p {
    color: #718096;
    margin-bottom: 0.5rem;
}

footer small {
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .calculator-card,
    .tip-guidelines {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .tip-buttons,
    .split-buttons {
        justify-content: center;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .guidelines-grid {
        grid-template-columns: 1fr;
    }
    
    nav h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calculator-card,
    .tip-guidelines {
        padding: 1rem;
    }
    
    .tip-buttons,
    .split-buttons {
        flex-direction: column;
    }
    
    .tip-btn,
    .split-btn {
        width: 100%;
    }
}

/* Focus States for Accessibility */
button:focus,
input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Home Screen Prompt */
.home-screen-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin: 0;
    text-align: center;
    position: relative;
    display: none; /* Hidden by default, shown via JavaScript */
}

.prompt-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.prompt-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.prompt-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.prompt-text p {
    margin: 0 0 15px 0;
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.95;
}

.prompt-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.prompt-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Mobile responsive for prompt */
@media (max-width: 768px) {
    .prompt-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .prompt-icon {
        font-size: 2rem;
    }
    
    .prompt-text h3 {
        font-size: 1.1rem;
    }
    
    .prompt-text p {
        font-size: 0.9rem;
    }
}

/* Social Sharing & Traffic Generation */
.social-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.social-section h3 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.social-section p {
    margin: 0 0 30px 0;
    font-size: 1.1rem;
    opacity: 0.95;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.social-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-btn span {
    font-size: 1.2rem;
}

.traffic-tips {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    max-width: 600px;
    margin: 0 auto;
}

.traffic-tips h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.traffic-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.traffic-tips li {
    margin: 10px 0;
    font-size: 1rem;
    line-height: 1.5;
}

.traffic-tips li strong {
    color: #fff;
    font-weight: 600;
}

/* Mobile responsive for social section */
@media (max-width: 768px) {
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 200px;
        justify-content: center;
    }
    
    .traffic-tips {
        margin: 0 20px;
    }
}
