* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #fff;
    min-height: 100vh;
    /*  padding: 20px;
    display: flex;
    justify-content: center;
    align-items: top; */
}

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

h1 {
    text-align: left;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: normal;
}

.calculator-container {
    background-color: #eeeeee;
    border-radius: 25px;
    padding: 60px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.option-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 1.3rem;
    cursor: pointer;
    background-color: #cccccc;
    transition: background-color 0.3s;
}

.option-label.active {
    background-color: #c8e6a8;
}

.radio-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #666;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    position: relative;
}

.option-label.active .radio-circle::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #8bc34a;
    position: absolute;
}

.label-text {
    font-size: 1.3rem;
}

.value-input {
    width: 100%;
    padding: 15px;
    font-size: 2rem;
    border: none;
    border-radius: 15px;
    background-color: white;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.arrow {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 10px;
    color: #000;
    align-self: flex-end;
    margin-bottom: 15px;
}

@media (max-width: 800px) {
    .calculator-container {
        flex-direction: column;
        padding: 30px 20px;
    }

    .arrow {
        transform: rotate(90deg);
        align-self: center;
        margin-bottom: 0;
    }
}

/* Gradient */

/* Specific for Rise:Run input/output */
.rise-run-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.rise-run-part {
    flex: 1;
    font-size: 2rem;
}

.fixed-rise {
    width: 40px;
    text-align: center;
    font-size: 2rem;
    padding: 15px 0;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.rise-run-separator {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 5px;
}

/* Index Page */
  /* Navigation Bar Styles */
        nav {
            background-color: #f8f8f8;
            padding: 15px 0;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .nav-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        .brand {
            font-size: 1.8rem;
            font-weight: bold;
            color: #333;
            text-decoration: none;
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropbtn {
            background-color: #4CAF50;
            color: white;
            padding: 10px 16px;
            font-size: 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            right: 0;
            background-color: #f9f9f9;
            min-width: 160px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
            z-index: 1;
            border-radius: 4px;
        }

        .dropdown-content a {
            color: black;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
            text-align: left;
        }

        .dropdown-content a:hover {
            background-color: #f1f1f1;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }

        header {
            margin-bottom: 30px;
            margin-top: 20px;
        }

        h1 {
            text-align: left;
            font-size: 2.5rem;
            color: #333;
        }

        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .card {
            background-color: #eeeeee;
            border-radius: 15px;
            padding: 25px;
            transition: 0.3s;
            text-decoration: none;
            color: inherit;
            display: block;
        }

        .card:hover {
            /* transform: translateY(-5px);*/
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            background-color:#c8e6a8;
        }

        .card h2 {
            margin-bottom: 10px;
            color: #333;
            font-size: 1.4rem;
        }

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

        footer {
            border-top: 1px solid #eee;
            padding-top: 20px;
            color: #666;
            line-height: 1.6;
        }

        @media (max-width: 768px) {
            .card-grid {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            }
            
            .dropdown {
                display: none; /* Hide dropdown menu on mobile */
            }
        }

        @media (max-width: 480px) {
            h1 {
                font-size: 2rem;
            }
            .card-grid {
                grid-template-columns: 1fr;
            }
            .container {
                padding: 15px;
            }
        }

/* Gradient graph */
.angle-visualization-container {
  background-color: #eeeeee;
  border-radius: 25px;
  padding: 30px;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.angle-visualization-container h2 {
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: normal;
  align-self: flex-start;
}

#angle-canvas {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Tally Page Styles */
.tally-label {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: block;
    font-weight: normal;
}

.numbers-textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    font-size: 1.5rem;
    border: none;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    resize: vertical;
    font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.4;
}

.tally-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sum-result {
    background-color: #c8e6a8;
    border-radius: 15px;
    padding: 20px;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.difference-display {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    font-size: 1.5rem;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Value in Words Styles */
.convert-button, .copy-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.convert-button:hover, .copy-button:hover {
    background-color: #45a049;
}

.copy-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.copy-button:disabled:hover {
    background-color: #cccccc;
}

/* Color Tiles Styles */
.color-grid-container {
    display: flex;
    gap: 10px;
    padding: 20px;
    overflow-x: auto;
}

.color-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 80px;
}

.color-tile {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Makes tiles square */
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.color-tile:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.hex-display {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: transparent;
    transition: color 0.2s;
    padding: 10px;
    text-align: center;
    word-break: break-word;
}

.color-tile:hover .hex-display {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .color-column {
        min-width: 60px;
    }

    .hex-display {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .color-column {
        min-width: 50px;
    }

    .hex-display {
        font-size: 0.6rem;
    }
}

/* Luminance Contrast Calculator Styles */
.lc-input-section {
    background-color: #eeeeee;
    border-radius: 25px;
    padding: 40px;
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.lc-materials-input {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-standard-selector {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-label {
    font-size: 1.3rem;
    font-weight: normal;
    color: #333;
}

.lc-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    font-size: 1.3rem;
    border: none;
    border-radius: 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    resize: vertical;
    font-family: 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
}

.lc-standard-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-standard-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 1.3rem;
    cursor: pointer;
    background-color: #cccccc;
    transition: background-color 0.3s;
}

.lc-standard-option.active {
    background-color: #c8e6a8;
}

.lc-matrix-container {
    overflow-x: auto;
    background-color: #eeeeee;
    border-radius: 25px;
    padding: 40px;
}

.lc-matrix-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
}

.lc-matrix-header {
    background-color: #f5f5f5;
    padding: 15px;
    text-align: center;
    font-weight: normal;
    font-size: 1.1rem;
    border: 1px solid #ddd;
    color: #333;
}

.lc-matrix-cell {
    padding: 20px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    border: 1px solid #ddd;
    min-width: 80px;
}

.lc-cell-pass {
    background-color: #c8e6a8;
    color: #333;
}

.lc-cell-fail {
    background-color: #f88379;
    color: #333;
}

.lc-cell-diagonal {
    background-color: #9e9e9e;
}

@media (max-width: 768px) {
    .lc-input-section {
        flex-direction: column;
        padding: 30px 20px;
    }

    .lc-matrix-container {
        padding: 20px;
    }

    .lc-matrix-cell {
        padding: 10px;
        font-size: 1rem;
        min-width: 60px;
    }

    .lc-matrix-header {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .lc-input-section {
        padding: 20px 15px;
    }

    .lc-textarea {
        min-height: 150px;
        font-size: 1.1rem;
    }

    .lc-label {
        font-size: 1.1rem;
    }

    .lc-standard-option {
        font-size: 1.1rem;
    }

    .lc-matrix-cell {
        padding: 8px;
        font-size: 0.9rem;
        min-width: 50px;
    }

    .lc-matrix-header {
        padding: 8px;
        font-size: 0.8rem;
    }
}

/* Architectural Scale Converter Styles */
.input-label {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: block;
    font-weight: normal;
}

.scale-input-group,
.scale-output-group {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.scale-prefix,
.scale-suffix {
    font-size: 2rem;
    font-weight: normal;
    color: #333;
    white-space: nowrap;
}

.scale-input-group .value-input,
.scale-output-group .value-input {
    flex: 1;
    min-height: 58px;
    display: flex;
    align-items: center;
}

.info-section {
    background-color: #f5f5f5;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    line-height: 1.6;
}

.info-section p {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #666;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.info-section strong {
    color: #333;
}

/* Gradient Calculator Styles */
.gradient-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-label {
    font-size: 1.3rem;
    color: #666;
    font-weight: normal;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.gradient-calc-container .arrow {
    align-self: flex-start;
    margin-top: 75px;
    margin-bottom: 0;
}