* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #ecf0f1;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

.logo-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.logo {
    height: 60px;
    width: auto;
    /* filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.3)); */
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 8px 25px rgba(255, 255, 255, 0.5));
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #3498db, #e74c3c, #f39c12);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
    margin: 0;
}

.title i {
    margin-right: 15px;
    color: #3498db;
    -webkit-text-fill-color: #3498db;
}

.subtitle {
    font-size: 1.2rem;
    color: #bdc3c7;
    font-weight: 300;
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Input Styles */
.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #ecf0f1;
    font-weight: 500;
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
    transform: scale(1.02);
}

.input-wrapper .unit {
    position: absolute;
    right: 15px;
    color: #95a5a6;
    font-weight: 500;
    pointer-events: none;
}

select {
    cursor: pointer;
}

select option {
    background: #2c3e50;
    color: #ecf0f1;
}

/* Button Styles */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calculate-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(231, 76, 60, 0.4);
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.calculate-btn:active {
    transform: translateY(-2px);
}

.calculate-btn i {
    margin-right: 10px;
}

/* Resistor Series Card */
.resistor-series-card {
    margin-top: 30px;
}

.resistor-table-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.table-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.table-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.resistor-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(155, 89, 182, 0.1) 100%);
}

.resistor-table th {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
}

.resistor-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.resistor-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.05);
}

.resistor-table tr:hover td {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2), rgba(155, 89, 182, 0.2));
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.resistor-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.series-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border-radius: 10px;
    color: white;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Custom Scrollbar */
.resistor-table-container::-webkit-scrollbar {
    width: 8px;
}

.resistor-table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.resistor-table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3498db, #9b59b6);
    border-radius: 10px;
}

.resistor-table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2980b9, #8e44ad);
}

/* Results Styles */
.results-container {
    min-height: 200px;
}

.result-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.result-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease-out;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.result-label {
    font-weight: 600;
    color: #ecf0f1;
}

.result-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #3498db;
}

.result-value.error {
    color: #e74c3c;
}

.result-value.success {
    color: #27ae60;
}

/* Info and Tips Cards */
.info-card, .tips-card {
    margin-top: 20px;
}

.formula {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #f39c12;
}

.formula p {
    margin-bottom: 10px;
}

.formula ul {
    list-style-position: inside;
    margin-left: 20px;
}

.tips-list {
    list-style: none;
}

.tips-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tips-list li:before {
    content: "💡";
    position: absolute;
    left: 0;
    top: 10px;
}

.tips-list li:last-child {
    border-bottom: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #95a5a6;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table Animation */
.table-fade-in {
    animation: tableSlideIn 0.6s ease-out;
}

@keyframes tableSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo-title-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        height: 50px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .container {
        padding: 15px;
    }
    
    .resistor-table th,
    .resistor-table td {
        padding: 8px 5px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 40px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 15px;
    }
    
    .calculate-btn {
        padding: 15px;
        font-size: 1rem;
    }
    
    .resistor-table th,
    .resistor-table td {
        padding: 6px 3px;
        font-size: 0.8rem;
    }
}

/* Special Effects */
.glow {
    animation: pulse 2s infinite;
}

.success-animation {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
} 