/* Personal Website Theme - Dark Mode */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

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

/* Header Styles */
header {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    text-align: center;
}

h1 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    color: #e0e0e0;
    font-size: 1.2em;
}

/* Navigation */
nav {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background: #007acc;
    color: #ffffff;
}

/* Content Sections */
.section {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.section h2 {
    color: #ffffff;
    margin-bottom: 15px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.section h3 {
    color: #ffffff;
    margin: 15px 0 10px 0;
}

/* Cards/Items Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: #383838;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.card h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    background: #007acc;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 5px;
}

.btn:hover {
    background: #005a9e;
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #444;
}

/* Form Elements */
input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #404040;
    color: #ffffff;
    margin-bottom: 10px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #007acc;
}

/* Contact Form */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #e0e0e0;
}

/* Footer */
footer {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.social-links a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background: #007acc;
    color: #ffffff;
}

/* Calculator Specific Styles */
.calculator {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.calculator .container {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.calculator h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
}

.group {
    border: 1px solid #444;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    background: #383838;
}

.group-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

.input-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.input-row label {
    flex: 1;
    color: #e0e0e0;
    min-width: 0;
}

.input-row input, .input-row select {
    width: 120px;
    min-width: 100px;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 3px;
    text-align: right;
    background: #404040;
    color: #ffffff;
    font-size: 16px; /* Prevents zoom on iOS */
}

.slider-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.slider-row label {
    width: 140px;
    min-width: 120px;
    color: #e0e0e0;
    flex-shrink: 0;
}

.slider-row input[type="range"] {
    flex: 1;
    accent-color: #007acc;
    height: 30px; /* Better touch target */
}

.slider-row .value {
    width: 50px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

.buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.result-main {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.result-main label {
    flex: 1;
    color: #e0e0e0;
}

.result-main input {
    width: 150px;
    padding: 8px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #404040;
    color: #ffffff;
    text-align: right;
    font-weight: bold;
    font-size: 16px;
}

#detailedResults {
    width: 100%;
    height: 120px;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #404040;
    color: #ffffff;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
}

.readonly {
    background: #353535 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2em;
    }
    
    /* Calculator mobile styles */
    .calculator {
        padding: 10px;
    }
    
    .calculator .container {
        padding: 15px;
    }
    
    .calculator h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .input-row label {
        margin-bottom: 5px;
    }
    
    .input-row input, .input-row select {
        width: 100%;
        text-align: left;
        padding: 12px;
    }
    
    .slider-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .slider-row label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .slider-row input[type="range"] {
        width: 100%;
        height: 40px;
    }
    
    .slider-row .value {
        width: 100%;
        text-align: center;
        font-size: 1.1em;
        margin-top: 5px;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .result-main {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .result-main input {
        width: 100%;
        text-align: left;
        padding: 12px;
    }
    
    #detailedResults {
        height: 150px;
        font-size: 11px;
    }
    
    .group {
        padding: 12px;
        margin-bottom: 15px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.highlight {
    color: #007acc;
}