* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #3a7bd5);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background-color: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(to right, #2c3e50, #4a6491);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

h1 i {
    font-size: 2.2rem;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.content {
    display: flex;
    flex-direction: column;
    padding: 30px;
}

@media (min-width: 768px) {
    .content {
        flex-direction: row;
        gap: 30px;
    }
}

.input-section, .output-section {
    flex: 1;
}

.section-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #3a7bd5;
}

.input-area {
    width: 100%;
    margin-bottom: 25px;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    line-height: 1.6;
}

textarea:focus {
    outline: none;
    border-color: #3a7bd5;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.1);
}

.input-info {
    text-align: right;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    min-width: 150px;
}

.btn-primary {
    background: linear-gradient(to right, #3a7bd5, #00d2ff);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(to right, #2c6bc7, #00c2ee);
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #f1f1f1;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    color: #3a7bd5;
    border: 2px solid #3a7bd5;
}

.btn-outline:hover {
    background: rgba(58, 123, 213, 0.1);
    transform: translateY(-3px);
}

.settings {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 10px;
}

.settings h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings h3 i {
    color: #3a7bd5;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #eee;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.checkbox:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox input:checked ~ .checkmark {
    background-color: #3a7bd5;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox input:checked ~ .checkmark:after {
    display: block;
}

.checkbox .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.output-area {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.output-info {
    font-size: 0.9rem;
    color: #666;
}

.btn-icon {
    background: #3a7bd5;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #2c6bc7;
    transform: scale(1.1);
}

.binary-output {
    padding: 20px;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.8;
    word-wrap: break-word;
    background-color: #1e1e1e;
    color: #00ff00;
    border-radius: 0 0 10px 10px;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    text-align: center;
}

.placeholder i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #3a7bd5;
}

.explanation {
    background-color: #f0f7ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #3a7bd5;
}

.explanation h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.explanation p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.example {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.example p {
    margin-bottom: 0;
}

code {
    background-color: #f1f1f1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #d63384;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    color: #666;
    border-top: 1px solid #dee2e6;
}

footer p {
    margin-bottom: 5px;
}

.footer-note {
    font-size: 0.9rem;
    color: #888;
}

.fa-heart {
    color: #e74c3c;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsif untuk ponsel */
@media (max-width: 767px) {
    h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .content {
        padding: 20px;
    }
    
    .btn {
        min-width: 100%;
    }
    
    .binary-output {
        font-size: 0.95rem;
    }
}