/* Real-Time BAC Tracker Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 0.5rem;
    color: #f39c12;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255,255,255,0.2);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Title */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

h1 i {
    color: #3498db;
    margin-right: 0.5rem;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    text-align: center;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    list-style: none;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: inline-flex;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Profile Section */
.profile-section {
    margin-bottom: 2rem;
}

.profile-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.profile-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-card h2 i {
    color: #3498db;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.input-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.input-with-unit {
    display: flex;
    gap: 0.5rem;
}

.input-with-unit input {
    flex: 2;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-with-unit input:focus {
    outline: none;
    border-color: #3498db;
}

.input-with-unit select,
.input-group select {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.input-group select {
    max-width: none;
}

.start-tracking-btn {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.start-tracking-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Saved Profile Indicator */
.saved-profile-indicator {
    background: linear-gradient(135deg, #d5f4e6, #e8f8f5);
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.saved-profile-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.saved-profile-info i {
    color: #27ae60;
    font-size: 1.2rem;
}

.saved-profile-info span {
    flex: 1;
    color: #2c3e50;
    font-weight: 600;
}

.edit-profile-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-profile-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* BAC Display Section */
.bac-display-section {
    margin-bottom: 2rem;
}

.bac-display-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.current-bac {
    text-align: center;
}

.current-bac h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.bac-value {
    font-size: 3rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.bac-value.warning {
    color: #f39c12;
}

.bac-value.danger {
    color: #e74c3c;
}

.bac-status {
    font-size: 1.2rem;
    font-weight: 600;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f8f9fa;
    display: inline-block;
}

.bac-status.warning {
    background: #fff3cd;
    color: #856404;
}

.bac-status.danger {
    background: #f8d7da;
    color: #721c24;
}

.bac-chart {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.bac-chart canvas {
    border-radius: 5px;
    max-width: 100%;
    height: auto;
}

/* Add Drink Section */
.add-drink-section {
    margin-bottom: 2rem;
}

.add-drink-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.add-drink-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-drink-card h2 i {
    color: #3498db;
}

.drink-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.custom-drink {
    grid-column: span 2;
}

.quantity-unit {
    flex: 1;
    min-width: 80px;
    max-width: 100px;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Input Hint */
.input-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

.drink-time {
    margin-bottom: 2rem;
}

.drink-time label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.drink-time input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    margin-right: 1rem;
}

.time-note {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.add-drink-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-drink-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* Drink History Section */
.drink-history-section {
    margin-bottom: 2rem;
}

.drink-history-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.drink-history-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drink-history-card h2 i {
    color: #3498db;
}

.history-list {
    margin-bottom: 2rem;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #3498db;
}

.history-item-info {
    flex: 1;
}

.history-item-time {
    font-weight: 600;
    color: #2c3e50;
}

.history-item-drink {
    color: #666;
    font-size: 0.9rem;
}

.history-item-bac {
    font-weight: bold;
    color: #3498db;
}

.history-actions {
    display: flex;
    gap: 1rem;
}

.clear-history-btn,
.reset-tracker-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-history-btn {
    background: #e74c3c;
    color: white;
}

.clear-history-btn:hover {
    background: #c0392b;
}

.reset-tracker-btn {
    background: #95a5a6;
    color: white;
}

.reset-tracker-btn:hover {
    background: #7f8c8d;
}

/* How It Works Section */
.how-it-works {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.how-it-works h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
    line-height: 1.6;
}

/* BAC Levels Info Section */
.bac-levels-info {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.bac-levels-info h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.bac-levels-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.bac-level-card {
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.bac-level-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.level-status {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    display: inline-block;
    font-size: 0.9rem;
}

.bac-level-card p {
    color: #666;
    line-height: 1.5;
}

/* BAC Level Color Schemes */
.bac-level-card.safe {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d5f4e6, #fafffe);
}

.bac-level-card.safe h3 {
    color: #27ae60;
}

.bac-level-card.safe .level-status {
    background: #27ae60;
    color: white;
}

.bac-level-card.mild {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fef9e7, #fafffe);
}

.bac-level-card.mild h3 {
    color: #f39c12;
}

.bac-level-card.mild .level-status {
    background: #f39c12;
    color: white;
}

.bac-level-card.warning {
    border-color: #e67e22;
    background: linear-gradient(135deg, #fdf2e9, #fafffe);
}

.bac-level-card.warning h3 {
    color: #e67e22;
}

.bac-level-card.warning .level-status {
    background: #e67e22;
    color: white;
}

.bac-level-card.danger {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fdedec, #fafffe);
}

.bac-level-card.danger h3 {
    color: #e74c3c;
}

.bac-level-card.danger .level-status {
    background: #e74c3c;
    color: white;
}

/* FAQ Section */
.faq-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.faq-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.faq-container {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

/* Related Tools Section */
.related-tools {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.related-tools h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.tool-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.tool-card i {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.tool-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.tool-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.tool-link:hover {
    background: #2980b9;
}

/* Safety Information Section */
.safety-info {
    background: linear-gradient(135deg, #fff5f5, #ffebee);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #ffcdd2;
    margin-bottom: 3rem;
}

.safety-info h2 {
    text-align: center;
    color: #c62828;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.safety-info h2 i {
    margin-right: 0.5rem;
}

.safety-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.disclaimer,
.safety-tips {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #ffcdd2;
}

.disclaimer h3,
.safety-tips h3 {
    color: #c62828;
    margin-bottom: 1rem;
}

.disclaimer p,
.safety-tips li {
    color: #666;
    line-height: 1.6;
}

.safety-tips ul {
    list-style: none;
    padding: 0;
}

.safety-tips li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.safety-tips li::before {
    content: '⚠️';
    position: absolute;
    left: 0;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    margin-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bac-display-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

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

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

    .safety-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .profile-grid,
    .drink-grid {
        grid-template-columns: 1fr;
    }

    .custom-drink {
        grid-column: span 1;
    }

    .quantity-unit {
        min-width: 60px;
        max-width: 80px;
        font-size: 0.9rem;
    }

    .history-actions {
        flex-direction: column;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .bac-levels-grid {
        grid-template-columns: 1fr;
    }

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

    .safety-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .profile-card,
    .bac-display-card,
    .add-drink-card,
    .drink-history-card,
    .how-it-works,
    .bac-levels-info,
    .faq-section,
    .related-tools,
    .safety-info {
        padding: 1.5rem;
    }

    .bac-value {
        font-size: 2.5rem;
    }

    .bac-level-card,
    .faq-item,
    .tool-card,
    .disclaimer,
    .safety-tips {
        padding: 1rem;
    }
}
