body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    background-color: #f8f9fa;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

h1 {
    color: #678998;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

span {
    color: #64442c;
}

.h1 {
    color: #ff9505;
    font-size: 2.6rem;
}

.calculator {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.course-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.course-input input, 
.course-input select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
}

.course-credits {
    max-width: 100%;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 100%;
}

.add-btn {
    background-color: #2ecc71;
    color: white;
}

.add-btn:hover {
    background-color: #27ae60;
}

.calculate-btn {
    background-color: #3498db;
    color: white;
}

.calculate-btn:hover {
    background-color: #2980b9;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    margin-top: 5px;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.src-btn {
    background-color: #af7ac5;
    color: white;
}

.src-btn:hover {
    background-color: #8e44ad;
}

#courses-container {
    margin-bottom: 15px;
}

#result {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    padding: 12px;
    background-color: #e8f4fc;
    border-radius: 5px;
    display: none;
    color: #2c3e50;
}

.error {
    border-color: #e74c3c !important;
}

#source-code pre {
    background-color: #f4f4f4;
    padding: 12px;
    border-radius: 5px;
    overflow-x: auto;
    max-height: 300px;
    white-space: pre-wrap;
    margin-bottom: 15px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Tablet and Desktop View */
@media (min-width: 600px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .calculator {
        padding: 25px;
    }
    
    .course-input {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .course-input input, 
    .course-input select {
        flex: 1;
        min-width: 120px;
        width: auto;
    }
    
    .course-name {
        min-width: 200px;
    }
    
    .course-credits {
        max-width: 80px;
    }
    
    .button-group {
        flex-direction: row;
    }
    
    button {
        width: auto;
        padding: 10px 20px;
    }
    
    .remove-btn {
        margin-top: 0;
    }
    
    #result {
        font-size: 1.25rem;
        padding: 15px;
    }
}