.calculator-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.courses-table {
  width: 100%;
  min-width: 300px; /* Minimum width before scrolling kicks in */
  border-collapse: collapse;
}

.courses-table th {
    background-color: #7AB80E;
    color: #ffffff;
    padding: 12px 10px;
    text-align: left;
    font-weight: 500;
	border-left: 1px solid white;
}

.courses-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.courses-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.courses-table tr:hover {
  background-color: #f0f7fd;
}

.course-row input, 
.course-row select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
		padding: 0px !important;
}

.course-credits {
    width: 80px;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.remove-btn:hover {
    background-color: #c0392b;
}

/* Button Styles */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 12px 18px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    flex: 1;
    min-width: 120px;
}

button:hover {
    background-color: #2980b9;
}

#add-course {
    background-color: #2ecc71;
}

#add-course:hover {
    background-color: #27ae60;
}

#reset-calculator {
    background-color: #e67e22;
}

#reset-calculator:hover {
    background-color: #d35400;
}

/* Result Section */
.result-section {
    padding: 6px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 15px;
}

#gpa-result {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 10px 0;
    color: #2c3e50;
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    border-left: 5px solid #3498db;
}

#grade-summary {
    margin-top: 20px;
}

.grade-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* GPA Planner */
.gpa-planner {
    margin-top: 12px;
    padding: 10px;
    background-color: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #d0e3ff;
}

.planner-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.input-group input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
}

#calculate-plan {
    background-color: #9b59b6;
    width: 100%;
    margin-top: 10px;
}

#calculate-plan:hover {
    background-color: #8e44ad;
}

#plan-result {
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #eee;
}

.details-table, .summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.details-table thead tr:first-child th,
.summary-table thead tr th {
    background-color: #2980b9;
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 1.1em;
}

.details-table thead tr:nth-child(2) th {
    background-color: #3498db;
    text-align: left;
    font-size: 1em;
    padding: 1px;
	border-left: 1px solid white;
}


.details-table td, 
.summary-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}


.details-table td, 
.summary-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.details-table tr:last-child td,
.summary-table tr:last-child td {
    border-bottom: none;
}

.details-table tr:nth-child(even),
.summary-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Header styling for details table */
.details-table th[colspan="3"] {
    text-align: center;
    font-size: 1.1em;
    background-color: #2980b9;
}

.details-table tr:last-child td,
.summary-table tr:last-child td {
    border-bottom: none;
}

.details-table tr:nth-child(even),
.summary-table tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.save-section {
    text-align: center;
    margin: 15px 0;
}

#save-results, #save-full {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#save-results:hover, #save-full:hover {
    background-color: #45a049;
}

#save-results i, #save-full i {
    font-size: 18px;
}

#save-results:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

#save-results:disabled:hover {
    background-color: #cccccc;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .calculator-container {
        max-width: 700px;
        padding: 10px;
    }
	
	.table-wrapper {
		background: linear-gradient(to right, white 95%, rgba(255,255,255,0));
	}
	
	.courses-table th {
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
  }
	
	.table-wrapper::after {
    content: '→';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #3498db;
    font-size: 24px;
    opacity: 0.6;
    pointer-events: none;
    animation: bounceRight 2s infinite;
  }
  
  @keyframes bounceRight {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(5px); }
  }
    
    .planner-inputs {
        grid-template-columns: 1fr 1fr;
    }
    
    .button-group {
        flex-wrap: nowrap;
    }
    
    button {
        flex: none;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
	
	.courses-table {
        min-width: 280px; /* Reduced from 300px */
    }
    
    .courses-table th, 
  .courses-table td {
    padding: 6px 2px;
    font-size: 13px;
  }
    
    .course-row input, 
  .course-row select {
    padding: 5px;
    font-size: 13px;
  }
  
  .courses-table td:nth-child(1) { /* Course Name */
        min-width: 130px;
        max-width: 130px;
    }
    
    .courses-table td:nth-child(2) { /* Grade */
        min-width: 80px;
        max-width: 80px;
    }
    
    .courses-table td:nth-child(3) { /* Credits */
        min-width: 35px;
        max-width: 35px;
    }
    
    .courses-table td:nth-child(4) { /* Action */
        min-width: 40px;
        max-width: 40px;
    }
  
  .remove-btn {
        padding: 3px 5px;
        font-size: 15px;
        width: 40px; /* Reduced from 50% */
    }
	
	.course-credits {
        width: 50px; /* Reduced from 80px */
    }
    
    button {
        padding: 8px 6px;
        font-size: 12px;
        min-width: 25px; /* Reduced from 120px */
    }
    
    #gpa-result {
        font-size: 1.2rem;
    }
	
	.button-group {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		margin-top: 10px;
	}
	
	.details-table th, 
    .details-table td,
    .summary-table th,
    .summary-table td {
        padding: 8px;
        font-size: 14px;
		text-align: center;
    }
    
    .details-table thead tr:first-child th,
    .summary-table thead tr th {
        font-size: 1em;
        padding: 1px;
    }
}