@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #7a9e97;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #8bc1b6;
    --accent-hover: #8bc1b6;
    --card-bg: #313131;
    --card-border: rgba(255, 255, 255, 0.1);
    --input-bg: #313131;
    --danger: #ef4444;
    --success: #51f49a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    padding: 2rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

header p {
    color: var(--text-main);
    font-size: 1.1rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.calc-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.calc-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: #fff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--accent);
}

.calc-icon img {
    padding: 0.5rem;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.calc-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.calc-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Calculator Specific Styles */
.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Add custom arrow for select */
.form-group {
    position: relative;
}

.form-group select {
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Custom select dropdown icon */
.form-group select+.select-icon {
    position: absolute;
    right: 1rem;
    top: 2.2rem;
    pointer-events: none;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn:active {
    transform: scale(0.98);
}

.results-panel {
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
}

.results-panel h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.result-item.highlight {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--card-border);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.nav-back:hover {
    color: var(--accent);
}

.nav-back svg {
    margin-right: 0.5rem;
    width: 20px;
    height: 20px;
}

.method-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.method-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.hidden {
    display: none !important;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.step-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.step-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step-value {
    font-family: monospace;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}